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/xtensa | |
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/xtensa')
-rw-r--r-- | arch/xtensa/Kconfig | 1 | ||||
-rw-r--r-- | arch/xtensa/include/asm/signal.h | 1 | ||||
-rw-r--r-- | arch/xtensa/include/asm/syscall.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/xtensa/include/uapi/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/process.c | 12 |
6 files changed, 4 insertions, 15 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 0d1f36a22c98..2481f267be29 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -16,6 +16,7 @@ config XTENSA | |||
16 | select GENERIC_KERNEL_THREAD | 16 | select GENERIC_KERNEL_THREAD |
17 | select GENERIC_KERNEL_EXECVE | 17 | select GENERIC_KERNEL_EXECVE |
18 | select ARCH_WANT_OPTIONAL_GPIOLIB | 18 | select ARCH_WANT_OPTIONAL_GPIOLIB |
19 | select CLONE_BACKWARDS | ||
19 | help | 20 | help |
20 | Xtensa processors are 32-bit RISC machines designed by Tensilica | 21 | Xtensa processors are 32-bit RISC machines designed by Tensilica |
21 | primarily for embedded systems. These processors are both | 22 | primarily for embedded systems. These processors are both |
diff --git a/arch/xtensa/include/asm/signal.h b/arch/xtensa/include/asm/signal.h index 72fd44c85b70..6f586bd90e18 100644 --- a/arch/xtensa/include/asm/signal.h +++ b/arch/xtensa/include/asm/signal.h | |||
@@ -27,7 +27,6 @@ struct k_sigaction { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | #include <asm/sigcontext.h> | 29 | #include <asm/sigcontext.h> |
30 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
31 | 30 | ||
32 | #endif /* __ASSEMBLY__ */ | 31 | #endif /* __ASSEMBLY__ */ |
33 | #endif /* _XTENSA_SIGNAL_H */ | 32 | #endif /* _XTENSA_SIGNAL_H */ |
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index 124aeee0d381..b00c928d4cce 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h | |||
@@ -10,8 +10,6 @@ | |||
10 | 10 | ||
11 | struct pt_regs; | 11 | struct pt_regs; |
12 | struct sigaction; | 12 | struct sigaction; |
13 | asmlinkage long sys_execve(char*, char**, char**, struct pt_regs*); | ||
14 | asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); | ||
15 | asmlinkage long xtensa_ptrace(long, long, long, long); | 13 | asmlinkage long xtensa_ptrace(long, long, long, long); |
16 | asmlinkage long xtensa_sigreturn(struct pt_regs*); | 14 | asmlinkage long xtensa_sigreturn(struct pt_regs*); |
17 | asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); | 15 | asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); |
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h index f4e6eaa40d1c..e002dbcc88b6 100644 --- a/arch/xtensa/include/asm/unistd.h +++ b/arch/xtensa/include/asm/unistd.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _XTENSA_UNISTD_H | 2 | #define _XTENSA_UNISTD_H |
3 | 3 | ||
4 | #define __ARCH_WANT_SYS_EXECVE | 4 | #define __ARCH_WANT_SYS_EXECVE |
5 | #define __ARCH_WANT_SYS_CLONE | ||
5 | #include <uapi/asm/unistd.h> | 6 | #include <uapi/asm/unistd.h> |
6 | 7 | ||
7 | /* | 8 | /* |
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h index 9f36d0e3e0ac..5162418c5d90 100644 --- a/arch/xtensa/include/uapi/asm/unistd.h +++ b/arch/xtensa/include/uapi/asm/unistd.h | |||
@@ -260,7 +260,7 @@ __SYSCALL(115, sys_sendmmsg, 4) | |||
260 | /* Process Operations */ | 260 | /* Process Operations */ |
261 | 261 | ||
262 | #define __NR_clone 116 | 262 | #define __NR_clone 116 |
263 | __SYSCALL(116, xtensa_clone, 5) | 263 | __SYSCALL(116, sys_clone, 5) |
264 | #define __NR_execve 117 | 264 | #define __NR_execve 117 |
265 | __SYSCALL(117, sys_execve, 3) | 265 | __SYSCALL(117, sys_execve, 3) |
266 | #define __NR_exit 118 | 266 | #define __NR_exit 118 |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 09ae7bfab9a7..1accf28da5f5 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -199,8 +199,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | |||
199 | */ | 199 | */ |
200 | 200 | ||
201 | int copy_thread(unsigned long clone_flags, unsigned long usp_thread_fn, | 201 | int copy_thread(unsigned long clone_flags, unsigned long usp_thread_fn, |
202 | unsigned long thread_fn_arg, | 202 | unsigned long thread_fn_arg, struct task_struct *p) |
203 | struct task_struct *p, struct pt_regs *unused) | ||
204 | { | 203 | { |
205 | struct pt_regs *childregs = task_pt_regs(p); | 204 | struct pt_regs *childregs = task_pt_regs(p); |
206 | 205 | ||
@@ -364,12 +363,3 @@ int dump_fpu(void) | |||
364 | { | 363 | { |
365 | return 0; | 364 | return 0; |
366 | } | 365 | } |
367 | |||
368 | asmlinkage | ||
369 | long xtensa_clone(unsigned long clone_flags, unsigned long newsp, | ||
370 | void __user *parent_tid, void *child_tls, | ||
371 | void __user *child_tid, long a5, | ||
372 | struct pt_regs *regs) | ||
373 | { | ||
374 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); | ||
375 | } | ||