mirror of https://gitee.com/openkylin/linux.git
[PATCH] unify sys_ptrace prototype
Make sure we always return, as all syscalls should. Also move the common prototype to <linux/syscalls.h> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
7024a9b884
commit
dfb7dac3af
|
@ -782,7 +782,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
|
|||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -665,7 +665,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
|
|||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -106,7 +106,7 @@ void ptrace_enable(struct task_struct *child)
|
|||
child->thread.frame0->__status |= REG__STATUS_STEP;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
unsigned long tmp;
|
||||
|
|
|
@ -57,7 +57,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
h8300_disable_trace(child);
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -354,7 +354,7 @@ ptrace_set_thread_area(struct task_struct *child,
|
|||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
struct user * dummy = NULL;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <linux/uio.h>
|
||||
#include <linux/nfs_fs.h>
|
||||
#include <linux/quota.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/sunrpc/svc.h>
|
||||
#include <linux/nfsd/nfsd.h>
|
||||
#include <linux/nfsd/cache.h>
|
||||
|
|
|
@ -756,7 +756,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
|
|||
return ret;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -121,7 +121,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
child->thread.work.syscall_trace = 0;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
unsigned long tmp;
|
||||
|
|
|
@ -101,7 +101,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
put_reg(child, PT_SR, tmp);
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -174,7 +174,7 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret;
|
||||
|
|
|
@ -240,7 +240,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
clear_single_step(child);
|
||||
}
|
||||
|
||||
int sys_ptrace(long request, long pid, long addr, long data)
|
||||
long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret = -EPERM;
|
||||
|
|
|
@ -53,7 +53,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
clear_single_step(child);
|
||||
}
|
||||
|
||||
int sys_ptrace(long request, long pid, long addr, long data)
|
||||
long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret = -EPERM;
|
||||
|
|
|
@ -80,7 +80,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
/* nothing to do.. */
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
struct user * dummy = NULL;
|
||||
|
|
|
@ -121,7 +121,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
extern void poke_real_address_q(unsigned long long addr, unsigned long long data);
|
||||
|
|
|
@ -11,7 +11,6 @@ typedef long syscall_handler_t(struct pt_regs);
|
|||
/* Not declared on x86, incompatible declarations on x86_64, so these have
|
||||
* to go here rather than in sys_call_table.c
|
||||
*/
|
||||
extern syscall_handler_t sys_ptrace;
|
||||
extern syscall_handler_t sys_rt_sigaction;
|
||||
|
||||
extern syscall_handler_t old_mmap_i386;
|
||||
|
|
|
@ -113,7 +113,7 @@ static int set_single_step (struct task_struct *t, int val)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int sys_ptrace(long request, long pid, long addr, long data)
|
||||
long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int rval;
|
||||
|
|
|
@ -45,7 +45,7 @@ void ptrace_disable(struct task_struct *child)
|
|||
/* Nothing to do.. */
|
||||
}
|
||||
|
||||
int sys_ptrace(long request, long pid, long addr, long data)
|
||||
long sys_ptrace(long request, long pid, long addr, long data)
|
||||
{
|
||||
struct task_struct *child;
|
||||
int ret = -EPERM;
|
||||
|
|
|
@ -544,7 +544,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
|||
asmlinkage int sys_fork(struct pt_regs *regs);
|
||||
asmlinkage int sys_vfork(struct pt_regs *regs);
|
||||
asmlinkage int sys_pipe(unsigned long *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -480,7 +480,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
|||
asmlinkage int sys_fork(struct pt_regs *regs);
|
||||
asmlinkage int sys_vfork(struct pt_regs *regs);
|
||||
asmlinkage int sys_pipe(unsigned long *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -367,7 +367,6 @@ asmlinkage int sys_fork(long r10, long r11, long r12, long r13,
|
|||
asmlinkage int sys_vfork(long r10, long r11, long r12, long r13,
|
||||
long mof, long srp, struct pt_regs *regs);
|
||||
asmlinkage int sys_pipe(unsigned long __user *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -528,7 +528,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
|
|||
asmlinkage int sys_execve(char *name, char **argv, char **envp,
|
||||
int dummy, ...);
|
||||
asmlinkage int sys_pipe(unsigned long *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -448,7 +448,6 @@ asmlinkage int sys_clone(struct pt_regs regs);
|
|||
asmlinkage int sys_fork(struct pt_regs regs);
|
||||
asmlinkage int sys_vfork(struct pt_regs regs);
|
||||
asmlinkage int sys_pipe(unsigned long __user *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
asmlinkage long sys_iopl(unsigned long unused);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
|
|
|
@ -383,8 +383,6 @@ struct sigaction;
|
|||
long sys_execve(char __user *filename, char __user * __user *argv,
|
||||
char __user * __user *envp, struct pt_regs *regs);
|
||||
asmlinkage long sys_pipe(void);
|
||||
asmlinkage long sys_ptrace(long request, pid_t pid,
|
||||
unsigned long addr, unsigned long data);
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
struct sigaction __user *oact,
|
||||
|
|
|
@ -452,7 +452,6 @@ asmlinkage int sys_clone(struct pt_regs regs);
|
|||
asmlinkage int sys_fork(struct pt_regs regs);
|
||||
asmlinkage int sys_vfork(struct pt_regs regs);
|
||||
asmlinkage int sys_pipe(unsigned long __user *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -444,7 +444,6 @@ asmlinkage long sys_mmap2(
|
|||
unsigned long fd, unsigned long pgoff);
|
||||
asmlinkage int sys_execve(char *name, char **argv, char **envp);
|
||||
asmlinkage int sys_pipe(unsigned long *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct pt_regs;
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
|
|
|
@ -504,7 +504,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
|
|||
unsigned long fd, unsigned long pgoff);
|
||||
asmlinkage int sys_execve(char *name, char **argv, char **envp);
|
||||
asmlinkage int sys_pipe(unsigned long *fildes);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct pt_regs;
|
||||
int sys_request_irq(unsigned int,
|
||||
irqreturn_t (*)(int, void *, struct pt_regs *),
|
||||
|
|
|
@ -1177,7 +1177,6 @@ asmlinkage long sys_mmap2(
|
|||
unsigned long fd, unsigned long pgoff);
|
||||
asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs);
|
||||
asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -469,7 +469,6 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
|
|||
int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
|
||||
struct pt_regs *regs);
|
||||
int sys_pipe(int __user *fildes);
|
||||
int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -467,7 +467,6 @@ int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
|
|||
unsigned long p4, unsigned long p5, unsigned long p6,
|
||||
struct pt_regs *regs);
|
||||
int sys_pipe(int __user *fildes);
|
||||
int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
long sys_rt_sigaction(int sig, const struct sigaction __user *act,
|
||||
struct sigaction __user *oact, size_t sigsetsize);
|
||||
|
|
|
@ -590,7 +590,6 @@ asmlinkage long sys_clone(struct pt_regs regs);
|
|||
asmlinkage long sys_fork(struct pt_regs regs);
|
||||
asmlinkage long sys_vfork(struct pt_regs regs);
|
||||
asmlinkage long sys_pipe(unsigned long __user *fildes);
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -503,7 +503,6 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
|
|||
asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs regs);
|
||||
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
|
||||
asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf,
|
||||
size_t count, long dummy, loff_t pos);
|
||||
asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf,
|
||||
|
|
|
@ -452,7 +452,6 @@ unsigned long sys_mmap2(unsigned long addr, size_t len,
|
|||
struct pt_regs;
|
||||
int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs);
|
||||
int sys_pipe (int *fildes);
|
||||
int sys_ptrace(long request, long pid, long addr, long data);
|
||||
struct sigaction;
|
||||
asmlinkage long sys_rt_sigaction(int sig,
|
||||
const struct sigaction __user *act,
|
||||
|
|
|
@ -780,8 +780,6 @@ asmlinkage long sys_pipe(int *fildes);
|
|||
#include <linux/types.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
asmlinkage long sys_ptrace(long request, long pid,
|
||||
unsigned long addr, long data);
|
||||
asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs);
|
||||
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on);
|
||||
struct sigaction;
|
||||
|
|
|
@ -491,6 +491,7 @@ asmlinkage long sys_nfsservctl(int cmd,
|
|||
asmlinkage long sys_syslog(int type, char __user *buf, int len);
|
||||
asmlinkage long sys_uselib(const char __user *library);
|
||||
asmlinkage long sys_ni_syscall(void);
|
||||
asmlinkage long sys_ptrace(long request, long pid, long addr, long data);
|
||||
|
||||
asmlinkage long sys_add_key(const char __user *_type,
|
||||
const char __user *_description,
|
||||
|
|
Loading…
Reference in New Issue