diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 15:22:13 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 15:22:13 -0500 |
| commit | 9977d9b379cb77e0f67bd6f4563618106e58e11d (patch) | |
| tree | 0191accfddf578edb52c69c933d64521e3dce297 /arch/sh/include | |
| parent | cf4af01221579a4e895f43dbfc47598fbfc5a731 (diff) | |
| parent | 541880d9a2c7871f6370071d55aa6662d329c51e (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull big execve/kernel_thread/fork unification series from Al Viro:
"All architectures are converted to new model. Quite a bit of that
stuff is actually shared with architecture trees; in such cases it's
literally shared branch pulled by both, not a cherry-pick.
A lot of ugliness and black magic is gone (-3KLoC total in this one):
- kernel_thread()/kernel_execve()/sys_execve() redesign.
We don't do syscalls from kernel anymore for either kernel_thread()
or kernel_execve():
kernel_thread() is essentially clone(2) with callback run before we
return to userland, the callbacks either never return or do
successful do_execve() before returning.
kernel_execve() is a wrapper for do_execve() - it doesn't need to
do transition to user mode anymore.
As a result kernel_thread() and kernel_execve() are
arch-independent now - they live in kernel/fork.c and fs/exec.c
resp. sys_execve() is also in fs/exec.c and it's completely
architecture-independent.
- daemonize() is gone, along with its parts in fs/*.c
- struct pt_regs * is no longer passed to do_fork/copy_process/
copy_thread/do_execve/search_binary_handler/->load_binary/do_coredump.
- sys_fork()/sys_vfork()/sys_clone() unified; some architectures
still need wrappers (ones with callee-saved registers not saved in
pt_regs on syscall entry), but the main part of those suckers is in
kernel/fork.c now."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (113 commits)
do_coredump(): get rid of pt_regs argument
print_fatal_signal(): get rid of pt_regs argument
ptrace_signal(): get rid of unused arguments
get rid of ptrace_signal_deliver() arguments
new helper: signal_pt_regs()
unify default ptrace_signal_deliver
flagday: kill pt_regs argument of do_fork()
death to idle_regs()
don't pass regs to copy_process()
flagday: don't pass regs to copy_thread()
bfin: switch to generic vfork, get rid of pointless wrappers
xtensa: switch to generic clone()
openrisc: switch to use of generic fork and clone
unicore32: switch to generic clone(2)
score: switch to generic fork/vfork/clone
c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()
take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
mn10300: switch to generic fork/vfork/clone
h8300: switch to generic fork/vfork/clone
tile: switch to generic clone()
...
Conflicts:
arch/microblaze/include/asm/Kbuild
Diffstat (limited to 'arch/sh/include')
| -rw-r--r-- | arch/sh/include/asm/processor_32.h | 5 | ||||
| -rw-r--r-- | arch/sh/include/asm/processor_64.h | 5 | ||||
| -rw-r--r-- | arch/sh/include/asm/syscalls_32.h | 14 | ||||
| -rw-r--r-- | arch/sh/include/asm/syscalls_64.h | 17 | ||||
| -rw-r--r-- | arch/sh/include/asm/unistd.h | 4 |
5 files changed, 4 insertions, 41 deletions
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index b6311fd2d06..b1320d55ca3 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h | |||
| @@ -126,11 +126,6 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned lo | |||
| 126 | /* Free all resources held by a thread. */ | 126 | /* Free all resources held by a thread. */ |
| 127 | extern void release_thread(struct task_struct *); | 127 | extern void release_thread(struct task_struct *); |
| 128 | 128 | ||
| 129 | /* | ||
| 130 | * create a kernel thread without removing it from tasklists | ||
| 131 | */ | ||
| 132 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
| 133 | |||
| 134 | /* Copy and release all segment info associated with a VM */ | 129 | /* Copy and release all segment info associated with a VM */ |
| 135 | #define copy_segments(p, mm) do { } while(0) | 130 | #define copy_segments(p, mm) do { } while(0) |
| 136 | #define release_segments(mm) do { } while(0) | 131 | #define release_segments(mm) do { } while(0) |
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index cd6029fb2c0..1ee8946f095 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
| @@ -159,11 +159,6 @@ struct mm_struct; | |||
| 159 | 159 | ||
| 160 | /* Free all resources held by a thread. */ | 160 | /* Free all resources held by a thread. */ |
| 161 | extern void release_thread(struct task_struct *); | 161 | extern void release_thread(struct task_struct *); |
| 162 | /* | ||
| 163 | * create a kernel thread without removing it from tasklists | ||
| 164 | */ | ||
| 165 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
| 166 | |||
| 167 | 162 | ||
| 168 | /* Copy and release all segment info associated with a VM */ | 163 | /* Copy and release all segment info associated with a VM */ |
| 169 | #define copy_segments(p, mm) do { } while (0) | 164 | #define copy_segments(p, mm) do { } while (0) |
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h index 6c1fa559753..cc25485996b 100644 --- a/arch/sh/include/asm/syscalls_32.h +++ b/arch/sh/include/asm/syscalls_32.h | |||
| @@ -9,20 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | struct pt_regs; | 10 | struct pt_regs; |
| 11 | 11 | ||
| 12 | asmlinkage int sys_fork(unsigned long r4, unsigned long r5, | ||
| 13 | unsigned long r6, unsigned long r7, | ||
| 14 | struct pt_regs __regs); | ||
| 15 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
| 16 | unsigned long parent_tidptr, | ||
| 17 | unsigned long child_tidptr, | ||
| 18 | struct pt_regs __regs); | ||
| 19 | asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | ||
| 20 | unsigned long r6, unsigned long r7, | ||
| 21 | struct pt_regs __regs); | ||
| 22 | asmlinkage int sys_execve(const char __user *ufilename, | ||
| 23 | const char __user *const __user *uargv, | ||
| 24 | const char __user *const __user *uenvp, | ||
| 25 | unsigned long r7, struct pt_regs __regs); | ||
| 26 | asmlinkage int sys_sigsuspend(old_sigset_t mask); | 12 | asmlinkage int sys_sigsuspend(old_sigset_t mask); |
| 27 | asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act, | 13 | asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act, |
| 28 | struct old_sigaction __user *oact); | 14 | struct old_sigaction __user *oact); |
diff --git a/arch/sh/include/asm/syscalls_64.h b/arch/sh/include/asm/syscalls_64.h index ee519f41d95..d62e8eb22f7 100644 --- a/arch/sh/include/asm/syscalls_64.h +++ b/arch/sh/include/asm/syscalls_64.h | |||
| @@ -9,23 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | struct pt_regs; | 10 | struct pt_regs; |
| 11 | 11 | ||
| 12 | asmlinkage int sys_fork(unsigned long r2, unsigned long r3, | ||
| 13 | unsigned long r4, unsigned long r5, | ||
| 14 | unsigned long r6, unsigned long r7, | ||
| 15 | struct pt_regs *pregs); | ||
| 16 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
| 17 | unsigned long r4, unsigned long r5, | ||
| 18 | unsigned long r6, unsigned long r7, | ||
| 19 | struct pt_regs *pregs); | ||
| 20 | asmlinkage int sys_vfork(unsigned long r2, unsigned long r3, | ||
| 21 | unsigned long r4, unsigned long r5, | ||
| 22 | unsigned long r6, unsigned long r7, | ||
| 23 | struct pt_regs *pregs); | ||
| 24 | asmlinkage int sys_execve(const char *ufilename, char **uargv, | ||
| 25 | char **uenvp, unsigned long r5, | ||
| 26 | unsigned long r6, unsigned long r7, | ||
| 27 | struct pt_regs *pregs); | ||
| 28 | |||
| 29 | /* Misc syscall related bits */ | 12 | /* Misc syscall related bits */ |
| 30 | asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs); | 13 | asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs); |
| 31 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | 14 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); |
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h index 38956dfa76f..43d3f26b2ea 100644 --- a/arch/sh/include/asm/unistd.h +++ b/arch/sh/include/asm/unistd.h | |||
| @@ -28,6 +28,10 @@ | |||
| 28 | # define __ARCH_WANT_SYS_SIGPENDING | 28 | # define __ARCH_WANT_SYS_SIGPENDING |
| 29 | # define __ARCH_WANT_SYS_SIGPROCMASK | 29 | # define __ARCH_WANT_SYS_SIGPROCMASK |
| 30 | # define __ARCH_WANT_SYS_RT_SIGACTION | 30 | # define __ARCH_WANT_SYS_RT_SIGACTION |
| 31 | # define __ARCH_WANT_SYS_EXECVE | ||
| 32 | # define __ARCH_WANT_SYS_FORK | ||
| 33 | # define __ARCH_WANT_SYS_VFORK | ||
| 34 | # define __ARCH_WANT_SYS_CLONE | ||
| 31 | 35 | ||
| 32 | /* | 36 | /* |
| 33 | * "Conditional" syscalls | 37 | * "Conditional" syscalls |
