diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-14 12:44:11 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-19 18:07:38 -0500 |
commit | ae903caae267154de7cf8576b130ff474630596b (patch) | |
tree | a39d238d7fd1742f7f20cacbd24a4d1b4957176e /fs/exec.c | |
parent | 468366138850f20543f1d4878028900672b23dae (diff) |
Bury the conditionals from kernel_thread/kernel_execve series
All architectures have
CONFIG_GENERIC_KERNEL_THREAD
CONFIG_GENERIC_KERNEL_EXECVE
__ARCH_WANT_SYS_EXECVE
None of them have __ARCH_WANT_KERNEL_EXECVE and there are only two callers
of kernel_execve() (which is a trivial wrapper for do_execve() now) left.
Kill the conditionals and make both callers use do_execve().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -1657,7 +1657,6 @@ int get_dumpable(struct mm_struct *mm) | |||
1657 | return __get_dumpable(mm->flags); | 1657 | return __get_dumpable(mm->flags); |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | #ifdef __ARCH_WANT_SYS_EXECVE | ||
1661 | SYSCALL_DEFINE3(execve, | 1660 | SYSCALL_DEFINE3(execve, |
1662 | const char __user *, filename, | 1661 | const char __user *, filename, |
1663 | const char __user *const __user *, argv, | 1662 | const char __user *const __user *, argv, |
@@ -1685,23 +1684,3 @@ asmlinkage long compat_sys_execve(const char __user * filename, | |||
1685 | return error; | 1684 | return error; |
1686 | } | 1685 | } |
1687 | #endif | 1686 | #endif |
1688 | #endif | ||
1689 | |||
1690 | #ifdef __ARCH_WANT_KERNEL_EXECVE | ||
1691 | int kernel_execve(const char *filename, | ||
1692 | const char *const argv[], | ||
1693 | const char *const envp[]) | ||
1694 | { | ||
1695 | int ret = do_execve(filename, | ||
1696 | (const char __user *const __user *)argv, | ||
1697 | (const char __user *const __user *)envp); | ||
1698 | if (ret < 0) | ||
1699 | return ret; | ||
1700 | |||
1701 | /* | ||
1702 | * We were successful. We won't be returning to our caller, but | ||
1703 | * instead to user space by manipulating the kernel stack. | ||
1704 | */ | ||
1705 | ret_from_kernel_execve(current_pt_regs()); | ||
1706 | } | ||
1707 | #endif | ||