diff options
Diffstat (limited to 'include/linux/binfmts.h')
| -rw-r--r-- | include/linux/binfmts.h | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 366422bc1633..cfcc6bfcaec0 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -1,24 +1,10 @@ | |||
| 1 | #ifndef _LINUX_BINFMTS_H | 1 | #ifndef _LINUX_BINFMTS_H |
| 2 | #define _LINUX_BINFMTS_H | 2 | #define _LINUX_BINFMTS_H |
| 3 | 3 | ||
| 4 | #include <linux/capability.h> | ||
| 5 | |||
| 6 | struct pt_regs; | ||
| 7 | |||
| 8 | /* | ||
| 9 | * These are the maximum length and maximum number of strings passed to the | ||
| 10 | * execve() system call. MAX_ARG_STRLEN is essentially random but serves to | ||
| 11 | * prevent the kernel from being unduly impacted by misaddressed pointers. | ||
| 12 | * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer. | ||
| 13 | */ | ||
| 14 | #define MAX_ARG_STRLEN (PAGE_SIZE * 32) | ||
| 15 | #define MAX_ARG_STRINGS 0x7FFFFFFF | ||
| 16 | |||
| 17 | /* sizeof(linux_binprm->buf) */ | ||
| 18 | #define BINPRM_BUF_SIZE 128 | ||
| 19 | |||
| 20 | #ifdef __KERNEL__ | ||
| 21 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
| 5 | #include <linux/unistd.h> | ||
| 6 | #include <asm/exec.h> | ||
| 7 | #include <uapi/linux/binfmts.h> | ||
| 22 | 8 | ||
| 23 | #define CORENAME_MAX_SIZE 128 | 9 | #define CORENAME_MAX_SIZE 128 |
| 24 | 10 | ||
| @@ -72,7 +58,7 @@ struct linux_binprm { | |||
| 72 | 58 | ||
| 73 | /* Function parameter for binfmt->coredump */ | 59 | /* Function parameter for binfmt->coredump */ |
| 74 | struct coredump_params { | 60 | struct coredump_params { |
| 75 | long signr; | 61 | siginfo_t *siginfo; |
| 76 | struct pt_regs *regs; | 62 | struct pt_regs *regs; |
| 77 | struct file *file; | 63 | struct file *file; |
| 78 | unsigned long limit; | 64 | unsigned long limit; |
| @@ -132,9 +118,11 @@ extern int copy_strings_kernel(int argc, const char *const *argv, | |||
| 132 | struct linux_binprm *bprm); | 118 | struct linux_binprm *bprm); |
| 133 | extern int prepare_bprm_creds(struct linux_binprm *bprm); | 119 | extern int prepare_bprm_creds(struct linux_binprm *bprm); |
| 134 | extern void install_exec_creds(struct linux_binprm *bprm); | 120 | extern void install_exec_creds(struct linux_binprm *bprm); |
| 135 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); | ||
| 136 | extern void set_binfmt(struct linux_binfmt *new); | 121 | extern void set_binfmt(struct linux_binfmt *new); |
| 137 | extern void free_bprm(struct linux_binprm *); | 122 | extern void free_bprm(struct linux_binprm *); |
| 138 | 123 | ||
| 139 | #endif /* __KERNEL__ */ | 124 | #ifdef __ARCH_WANT_KERNEL_EXECVE |
| 125 | extern void ret_from_kernel_execve(struct pt_regs *normal) __noreturn; | ||
| 126 | #endif | ||
| 127 | |||
| 140 | #endif /* _LINUX_BINFMTS_H */ | 128 | #endif /* _LINUX_BINFMTS_H */ |
