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; | |||
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/unistd.h> | ||
23 | #include <asm/exec.h> | ||
22 | 24 | ||
23 | #define CORENAME_MAX_SIZE 128 | 25 | #define CORENAME_MAX_SIZE 128 |
24 | 26 | ||
@@ -135,5 +137,9 @@ extern void install_exec_creds(struct linux_binprm *bprm); | |||
135 | extern void set_binfmt(struct linux_binfmt *new); | 137 | extern void set_binfmt(struct linux_binfmt *new); |
136 | extern void free_bprm(struct linux_binprm *); | 138 | extern void free_bprm(struct linux_binprm *); |
137 | 139 | ||
140 | #ifdef __ARCH_WANT_KERNEL_EXECVE | ||
141 | extern void ret_from_kernel_execve(struct pt_regs *normal) __noreturn; | ||
142 | #endif | ||
143 | |||
138 | #endif /* __KERNEL__ */ | 144 | #endif /* __KERNEL__ */ |
139 | #endif /* _LINUX_BINFMTS_H */ | 145 | #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, | |||
284 | const struct compat_iovec __user *vec, | 284 | const struct compat_iovec __user *vec, |
285 | unsigned long vlen, u32 pos_low, u32 pos_high); | 285 | unsigned long vlen, u32 pos_low, u32 pos_high); |
286 | 286 | ||
287 | int compat_do_execve(char *filename, compat_uptr_t __user *argv, | 287 | int compat_do_execve(const char *filename, const compat_uptr_t __user *argv, |
288 | compat_uptr_t __user *envp, struct pt_regs *regs); | 288 | const compat_uptr_t __user *envp, struct pt_regs *regs); |
289 | #ifdef __ARCH_WANT_SYS_EXECVE | ||
290 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, | ||
291 | const compat_uptr_t __user *envp); | ||
292 | #endif | ||
289 | 293 | ||
290 | asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | 294 | asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, |
291 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 295 | 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, | |||
401 | #define arch_ptrace_stop(code, info) do { } while (0) | 401 | #define arch_ptrace_stop(code, info) do { } while (0) |
402 | #endif | 402 | #endif |
403 | 403 | ||
404 | #ifndef current_pt_regs | ||
405 | #define current_pt_regs() task_pt_regs(current) | ||
406 | #endif | ||
407 | |||
404 | extern int task_current_syscall(struct task_struct *target, long *callno, | 408 | extern int task_current_syscall(struct task_struct *target, long *callno, |
405 | unsigned long args[6], unsigned int maxargs, | 409 | unsigned long args[6], unsigned int maxargs, |
406 | unsigned long *sp, unsigned long *pc); | 410 | 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 *, | |||
2332 | const char __user * const __user *, struct pt_regs *); | 2332 | const char __user * const __user *, struct pt_regs *); |
2333 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); | 2333 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); |
2334 | struct task_struct *fork_idle(int); | 2334 | struct task_struct *fork_idle(int); |
2335 | #ifdef CONFIG_GENERIC_KERNEL_THREAD | ||
2336 | extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
2337 | #endif | ||
2335 | 2338 | ||
2336 | extern void set_task_comm(struct task_struct *tsk, char *from); | 2339 | extern void set_task_comm(struct task_struct *tsk, char *from); |
2337 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2340 | extern char *get_task_comm(char *to, struct task_struct *tsk); |