diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/binfmts.h | 6 | ||||
-rw-r--r-- | include/linux/compat.h | 8 | ||||
-rw-r--r-- | include/linux/ptrace.h | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 3 |
4 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 37935c2d2e8f..26531f32bbb2 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -19,6 +19,8 @@ struct pt_regs; #ifdef __KERNEL__ #include <linux/sched.h> +#include <linux/unistd.h> +#include <asm/exec.h> #define CORENAME_MAX_SIZE 128 @@ -135,5 +137,9 @@ extern void install_exec_creds(struct linux_binprm *bprm); extern void set_binfmt(struct linux_binfmt *new); extern void free_bprm(struct linux_binprm *); +#ifdef __ARCH_WANT_KERNEL_EXECVE +extern void ret_from_kernel_execve(struct pt_regs *normal) __noreturn; +#endif + #endif /* __KERNEL__ */ #endif /* _LINUX_BINFMTS_H */ diff --git a/include/linux/compat.h b/include/linux/compat.h index 3f53d002c7c5..d0ced1011f2f 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -284,8 +284,12 @@ asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, const struct compat_iovec __user *vec, unsigned long vlen, u32 pos_low, u32 pos_high); -int compat_do_execve(char *filename, compat_uptr_t __user *argv, - compat_uptr_t __user *envp, struct pt_regs *regs); +int compat_do_execve(const char *filename, const compat_uptr_t __user *argv, + const compat_uptr_t __user *envp, struct pt_regs *regs); +#ifdef __ARCH_WANT_SYS_EXECVE +asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, + const compat_uptr_t __user *envp); +#endif asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp, compat_ulong_t __user *exp, diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 3db698aee34c..1d24ffad59c5 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -401,6 +401,10 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, #define arch_ptrace_stop(code, info) do { } while (0) #endif +#ifndef current_pt_regs +#define current_pt_regs() task_pt_regs(current) +#endif + extern int task_current_syscall(struct task_struct *target, long *callno, unsigned long args[6], unsigned int maxargs, unsigned long *sp, unsigned long *pc); diff --git a/include/linux/sched.h b/include/linux/sched.h index c2070e92a9d6..a83ca5816ecb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2332,6 +2332,9 @@ extern int do_execve(const char *, const char __user * const __user *, struct pt_regs *); extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); struct task_struct *fork_idle(int); +#ifdef CONFIG_GENERIC_KERNEL_THREAD +extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); +#endif extern void set_task_comm(struct task_struct *tsk, char *from); extern char *get_task_comm(char *to, struct task_struct *tsk); |