add some prototypes to <memory.h>
This commit is contained in:
@ -27,9 +27,6 @@
|
|||||||
#include <mman.h>
|
#include <mman.h>
|
||||||
|
|
||||||
void terminate(int, int);
|
void terminate(int, int);
|
||||||
int copy_from_user(void *dst, const void *src, size_t siz);
|
|
||||||
int copy_to_user(void *dst, const void *src, size_t siz);
|
|
||||||
int write_process_vm(struct process_vm *vm, void *dst, const void *src, size_t siz);
|
|
||||||
extern long do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact);
|
extern long do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact);
|
||||||
long syscall(int num, ihk_mc_user_context_t *ctx);
|
long syscall(int num, ihk_mc_user_context_t *ctx);
|
||||||
extern void save_fp_regs(struct thread *proc);
|
extern void save_fp_regs(struct thread *proc);
|
||||||
|
|||||||
@ -38,9 +38,6 @@ extern int sscanf(const char * buf, const char * fmt, ...);
|
|||||||
|
|
||||||
extern int osnum;
|
extern int osnum;
|
||||||
|
|
||||||
int copy_from_user(void *dst, const void *src, size_t siz);
|
|
||||||
int copy_to_user(void *dst, const void *src, size_t siz);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
procfs_thread_ctl(struct thread *thread, int msg)
|
procfs_thread_ctl(struct thread *thread, int msg)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -105,10 +105,6 @@ void check_signal(unsigned long, void *, int);
|
|||||||
void do_signal(long rc, void *regs, struct thread *thread, struct sig_pending *pending, int num);
|
void do_signal(long rc, void *regs, struct thread *thread, struct sig_pending *pending, int num);
|
||||||
extern unsigned long do_kill(struct thread *thread, int pid, int tid, int sig, struct siginfo *info, int ptracecont);
|
extern unsigned long do_kill(struct thread *thread, int pid, int tid, int sig, struct siginfo *info, int ptracecont);
|
||||||
extern struct sigpending *hassigpending(struct thread *thread);
|
extern struct sigpending *hassigpending(struct thread *thread);
|
||||||
int copy_from_user(void *, const void *, size_t);
|
|
||||||
int read_process_vm(struct process_vm *, void *, const void *, size_t);
|
|
||||||
int copy_to_user(void *, const void *, size_t);
|
|
||||||
int patch_process_vm(struct process_vm *, void *, const void *, size_t);
|
|
||||||
extern long alloc_debugreg(struct thread *thread);
|
extern long alloc_debugreg(struct thread *thread);
|
||||||
extern int num_processors;
|
extern int num_processors;
|
||||||
extern unsigned long ihk_mc_get_ns_per_tsc(void);
|
extern unsigned long ihk_mc_get_ns_per_tsc(void);
|
||||||
|
|||||||
@ -28,8 +28,21 @@ static void *phys_to_virt(unsigned long p)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct process_vm;
|
||||||
|
|
||||||
unsigned long virt_to_phys(void *v);
|
unsigned long virt_to_phys(void *v);
|
||||||
void *phys_to_virt(unsigned long p);
|
void *phys_to_virt(unsigned long p);
|
||||||
|
int copy_from_user(void *dst, const void *src, size_t siz);
|
||||||
|
int strlen_user(const char *s);
|
||||||
|
int strcpy_from_user(char *dst, const char *src);
|
||||||
|
long getlong_user(const long *p);
|
||||||
|
int getint_user(const int *p);
|
||||||
|
int read_process_vm(struct process_vm *vm, void *kdst, const void *usrc, size_t siz);
|
||||||
|
int copy_to_user(void *dst, const void *src, size_t siz);
|
||||||
|
int setlong_user(long *dst, long data);
|
||||||
|
int setint_user(int *dst, int data);
|
||||||
|
int write_process_vm(struct process_vm *vm, void *udst, const void *ksrc, size_t siz);
|
||||||
|
int patch_process_vm(struct process_vm *vm, void *udst, const void *ksrc, size_t siz);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -12,10 +12,7 @@
|
|||||||
|
|
||||||
#include <kmalloc.h>
|
#include <kmalloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <memory.h>
|
||||||
extern int strlen_user(const char *);
|
|
||||||
extern int strcpy_from_user(char *, const char *);
|
|
||||||
extern long getlong_user(const void *);
|
|
||||||
|
|
||||||
size_t strlen(const char *p)
|
size_t strlen(const char *p)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user