Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Drop struct pt_regs * argument in compat_sys_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 733deca1 6a872777

+6 -13
-6
arch/tile/include/asm/compat.h
··· 275 275 struct compat_sigaction; 276 276 struct compat_siginfo; 277 277 struct compat_sigaltstack; 278 - long compat_sys_execve(const char __user *path, 279 - compat_uptr_t __user *argv, 280 - compat_uptr_t __user *envp, struct pt_regs *); 281 278 long compat_sys_rt_sigaction(int sig, struct compat_sigaction __user *act, 282 279 struct compat_sigaction __user *oact, 283 280 size_t sigsetsize); ··· 301 304 struct compat_timespec __user *interval); 302 305 303 306 /* These are the intvec_64.S trampolines. */ 304 - long _compat_sys_execve(const char __user *path, 305 - const compat_uptr_t __user *argv, 306 - const compat_uptr_t __user *envp); 307 307 long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, 308 308 struct compat_sigaltstack __user *uoss_ptr); 309 309 long _compat_sys_rt_sigreturn(void);
+3
arch/tile/include/asm/processor.h
··· 239 239 #define KSTK_TOP(task) (task_ksp0(task) - STACK_TOP_DELTA) 240 240 #define task_pt_regs(task) \ 241 241 ((struct pt_regs *)(task_ksp0(task) - KSTK_PTREGS_GAP) - 1) 242 + #define current_pt_regs() \ 243 + ((struct pt_regs *)((stack_pointer | (THREAD_SIZE - 1)) - \ 244 + (KSTK_PTREGS_GAP - 1)) - 1) 242 245 #define task_sp(task) (task_pt_regs(task)->sp) 243 246 #define task_pc(task) (task_pt_regs(task)->pc) 244 247 /* Aliases for pc and sp (used in fs/proc/array.c) */
-1
arch/tile/kernel/compat.c
··· 103 103 #define compat_sys_readahead sys32_readahead 104 104 105 105 /* Call the trampolines to manage pt_regs where necessary. */ 106 - #define compat_sys_execve _compat_sys_execve 107 106 #define compat_sys_sigaltstack _compat_sys_sigaltstack 108 107 #define compat_sys_rt_sigreturn _compat_sys_rt_sigreturn 109 108 #define sys_clone _sys_clone
-1
arch/tile/kernel/intvec_64.S
··· 1194 1194 PTREGS_SYSCALL(sys_sigaltstack, r2) 1195 1195 PTREGS_SYSCALL_SIGRETURN(sys_rt_sigreturn, r0) 1196 1196 #ifdef CONFIG_COMPAT 1197 - PTREGS_SYSCALL(compat_sys_execve, r3) 1198 1197 PTREGS_SYSCALL(compat_sys_sigaltstack, r2) 1199 1198 PTREGS_SYSCALL_SIGRETURN(compat_sys_rt_sigreturn, r0) 1200 1199 #endif
+3 -3
arch/tile/kernel/process.c
··· 614 614 #ifdef CONFIG_COMPAT 615 615 long compat_sys_execve(const char __user *path, 616 616 compat_uptr_t __user *argv, 617 - compat_uptr_t __user *envp, 618 - struct pt_regs *regs) 617 + compat_uptr_t __user *envp) 619 618 { 620 619 long error; 621 620 struct filename *filename; ··· 623 624 error = PTR_ERR(filename); 624 625 if (IS_ERR(filename)) 625 626 goto out; 626 - error = compat_do_execve(filename->name, argv, envp, regs); 627 + error = compat_do_execve(filename->name, argv, envp, 628 + current_pt_regs()); 627 629 putname(filename); 628 630 if (error == 0) 629 631 single_step_execve();
-2
include/linux/compat.h
··· 286 286 287 287 int compat_do_execve(const char *filename, const compat_uptr_t __user *argv, 288 288 const compat_uptr_t __user *envp, struct pt_regs *regs); 289 - #ifdef __ARCH_WANT_SYS_EXECVE 290 289 asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, 291 290 const compat_uptr_t __user *envp); 292 - #endif 293 291 294 292 asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, 295 293 compat_ulong_t __user *outp, compat_ulong_t __user *exp,