diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-20 22:00:48 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 21:53:38 -0500 |
commit | 71613c3b871c5a9f27cc48f124251bcd3aa23be1 (patch) | |
tree | 792635fc67cb3397c66e4988d5ca92660efcdc6e /fs | |
parent | 3c456bfc4ba66e9cda210da7bc4fb0ba9fcc6972 (diff) |
get rid of pt_regs argument of ->load_binary()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_aout.c | 5 | ||||
-rw-r--r-- | fs/binfmt_elf.c | 5 | ||||
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 6 | ||||
-rw-r--r-- | fs/binfmt_em86.c | 2 | ||||
-rw-r--r-- | fs/binfmt_flat.c | 5 | ||||
-rw-r--r-- | fs/binfmt_misc.c | 2 | ||||
-rw-r--r-- | fs/binfmt_script.c | 2 | ||||
-rw-r--r-- | fs/binfmt_som.c | 5 | ||||
-rw-r--r-- | fs/exec.c | 4 |
9 files changed, 20 insertions, 16 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 0e7a6f81ae36..6043567b95c2 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
31 | #include <asm/a.out-core.h> | 31 | #include <asm/a.out-core.h> |
32 | 32 | ||
33 | static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs); | 33 | static int load_aout_binary(struct linux_binprm *); |
34 | static int load_aout_library(struct file*); | 34 | static int load_aout_library(struct file*); |
35 | 35 | ||
36 | #ifdef CONFIG_COREDUMP | 36 | #ifdef CONFIG_COREDUMP |
@@ -201,8 +201,9 @@ static unsigned long __user *create_aout_tables(char __user *p, struct linux_bin | |||
201 | * libraries. There is no binary dependent code anywhere else. | 201 | * libraries. There is no binary dependent code anywhere else. |
202 | */ | 202 | */ |
203 | 203 | ||
204 | static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) | 204 | static int load_aout_binary(struct linux_binprm * bprm) |
205 | { | 205 | { |
206 | struct pt_regs *regs = current_pt_regs(); | ||
206 | struct exec ex; | 207 | struct exec ex; |
207 | unsigned long error; | 208 | unsigned long error; |
208 | unsigned long fd_offset; | 209 | unsigned long fd_offset; |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index fbd9f60bd763..6d7d1647a68c 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #define user_siginfo_t siginfo_t | 44 | #define user_siginfo_t siginfo_t |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs); | 47 | static int load_elf_binary(struct linux_binprm *bprm); |
48 | static int load_elf_library(struct file *); | 48 | static int load_elf_library(struct file *); |
49 | static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *, | 49 | static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *, |
50 | int, int, unsigned long); | 50 | int, int, unsigned long); |
@@ -558,7 +558,7 @@ static unsigned long randomize_stack_top(unsigned long stack_top) | |||
558 | #endif | 558 | #endif |
559 | } | 559 | } |
560 | 560 | ||
561 | static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 561 | static int load_elf_binary(struct linux_binprm *bprm) |
562 | { | 562 | { |
563 | struct file *interpreter = NULL; /* to shut gcc up */ | 563 | struct file *interpreter = NULL; /* to shut gcc up */ |
564 | unsigned long load_addr = 0, load_bias = 0; | 564 | unsigned long load_addr = 0, load_bias = 0; |
@@ -575,6 +575,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
575 | unsigned long reloc_func_desc __maybe_unused = 0; | 575 | unsigned long reloc_func_desc __maybe_unused = 0; |
576 | int executable_stack = EXSTACK_DEFAULT; | 576 | int executable_stack = EXSTACK_DEFAULT; |
577 | unsigned long def_flags = 0; | 577 | unsigned long def_flags = 0; |
578 | struct pt_regs *regs = current_pt_regs(); | ||
578 | struct { | 579 | struct { |
579 | struct elfhdr elf_ex; | 580 | struct elfhdr elf_ex; |
580 | struct elfhdr interp_elf_ex; | 581 | struct elfhdr interp_elf_ex; |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index a46049154107..dc84732e554f 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -56,7 +56,7 @@ typedef char *elf_caddr_t; | |||
56 | 56 | ||
57 | MODULE_LICENSE("GPL"); | 57 | MODULE_LICENSE("GPL"); |
58 | 58 | ||
59 | static int load_elf_fdpic_binary(struct linux_binprm *, struct pt_regs *); | 59 | static int load_elf_fdpic_binary(struct linux_binprm *); |
60 | static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *, struct file *); | 60 | static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *, struct file *); |
61 | static int elf_fdpic_map_file(struct elf_fdpic_params *, struct file *, | 61 | static int elf_fdpic_map_file(struct elf_fdpic_params *, struct file *, |
62 | struct mm_struct *, const char *); | 62 | struct mm_struct *, const char *); |
@@ -164,10 +164,10 @@ static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, | |||
164 | /* | 164 | /* |
165 | * load an fdpic binary into various bits of memory | 165 | * load an fdpic binary into various bits of memory |
166 | */ | 166 | */ |
167 | static int load_elf_fdpic_binary(struct linux_binprm *bprm, | 167 | static int load_elf_fdpic_binary(struct linux_binprm *bprm) |
168 | struct pt_regs *regs) | ||
169 | { | 168 | { |
170 | struct elf_fdpic_params exec_params, interp_params; | 169 | struct elf_fdpic_params exec_params, interp_params; |
170 | struct pt_regs *regs = current_pt_regs(); | ||
171 | struct elf_phdr *phdr; | 171 | struct elf_phdr *phdr; |
172 | unsigned long stack_size, entryaddr; | 172 | unsigned long stack_size, entryaddr; |
173 | #ifdef ELF_FDPIC_PLAT_INIT | 173 | #ifdef ELF_FDPIC_PLAT_INIT |
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 7e125718a75e..4e6cce57d113 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #define EM86_INTERP "/usr/bin/em86" | 22 | #define EM86_INTERP "/usr/bin/em86" |
23 | #define EM86_I_NAME "em86" | 23 | #define EM86_I_NAME "em86" |
24 | 24 | ||
25 | static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) | 25 | static int load_em86(struct linux_binprm *bprm) |
26 | { | 26 | { |
27 | char *interp, *i_name, *i_arg; | 27 | char *interp, *i_name, *i_arg; |
28 | struct file * file; | 28 | struct file * file; |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index e280352b28f9..b56371981d16 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -88,7 +88,7 @@ struct lib_info { | |||
88 | static int load_flat_shared_library(int id, struct lib_info *p); | 88 | static int load_flat_shared_library(int id, struct lib_info *p); |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | static int load_flat_binary(struct linux_binprm *, struct pt_regs * regs); | 91 | static int load_flat_binary(struct linux_binprm *); |
92 | static int flat_core_dump(struct coredump_params *cprm); | 92 | static int flat_core_dump(struct coredump_params *cprm); |
93 | 93 | ||
94 | static struct linux_binfmt flat_format = { | 94 | static struct linux_binfmt flat_format = { |
@@ -858,9 +858,10 @@ out: | |||
858 | * libraries. There is no binary dependent code anywhere else. | 858 | * libraries. There is no binary dependent code anywhere else. |
859 | */ | 859 | */ |
860 | 860 | ||
861 | static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs) | 861 | static int load_flat_binary(struct linux_binprm * bprm) |
862 | { | 862 | { |
863 | struct lib_info libinfo; | 863 | struct lib_info libinfo; |
864 | struct pt_regs *regs = current_pt_regs(); | ||
864 | unsigned long p = bprm->p; | 865 | unsigned long p = bprm->p; |
865 | unsigned long stack_len; | 866 | unsigned long stack_len; |
866 | unsigned long start_addr; | 867 | unsigned long start_addr; |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 226aeac22ac9..b0b70fbea06c 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -104,7 +104,7 @@ static Node *check_file(struct linux_binprm *bprm) | |||
104 | /* | 104 | /* |
105 | * the loader itself | 105 | * the loader itself |
106 | */ | 106 | */ |
107 | static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) | 107 | static int load_misc_binary(struct linux_binprm *bprm) |
108 | { | 108 | { |
109 | Node *fmt; | 109 | Node *fmt; |
110 | struct file * interp_file = NULL; | 110 | struct file * interp_file = NULL; |
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index 798b729f01d5..8c954997e7f7 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | 16 | ||
17 | static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) | 17 | static int load_script(struct linux_binprm *bprm) |
18 | { | 18 | { |
19 | const char *i_arg, *i_name; | 19 | const char *i_arg, *i_name; |
20 | char *cp; | 20 | char *cp; |
diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c index 4517aaff61b4..4e00ed68d4a6 100644 --- a/fs/binfmt_som.c +++ b/fs/binfmt_som.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/elf.h> | 36 | #include <linux/elf.h> |
37 | 37 | ||
38 | static int load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs); | 38 | static int load_som_binary(struct linux_binprm * bprm); |
39 | static int load_som_library(struct file *); | 39 | static int load_som_library(struct file *); |
40 | 40 | ||
41 | /* | 41 | /* |
@@ -180,13 +180,14 @@ out: | |||
180 | */ | 180 | */ |
181 | 181 | ||
182 | static int | 182 | static int |
183 | load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) | 183 | load_som_binary(struct linux_binprm * bprm) |
184 | { | 184 | { |
185 | int retval; | 185 | int retval; |
186 | unsigned int size; | 186 | unsigned int size; |
187 | unsigned long som_entry; | 187 | unsigned long som_entry; |
188 | struct som_hdr *som_ex; | 188 | struct som_hdr *som_ex; |
189 | struct som_exec_auxhdr *hpuxhdr; | 189 | struct som_exec_auxhdr *hpuxhdr; |
190 | struct pt_regs *regs = current_pt_regs(); | ||
190 | 191 | ||
191 | /* Get the exec-header */ | 192 | /* Get the exec-header */ |
192 | som_ex = (struct som_hdr *) bprm->buf; | 193 | som_ex = (struct som_hdr *) bprm->buf; |
@@ -1374,13 +1374,13 @@ int search_binary_handler(struct linux_binprm *bprm) | |||
1374 | for (try=0; try<2; try++) { | 1374 | for (try=0; try<2; try++) { |
1375 | read_lock(&binfmt_lock); | 1375 | read_lock(&binfmt_lock); |
1376 | list_for_each_entry(fmt, &formats, lh) { | 1376 | list_for_each_entry(fmt, &formats, lh) { |
1377 | int (*fn)(struct linux_binprm *, struct pt_regs *) = fmt->load_binary; | 1377 | int (*fn)(struct linux_binprm *) = fmt->load_binary; |
1378 | if (!fn) | 1378 | if (!fn) |
1379 | continue; | 1379 | continue; |
1380 | if (!try_module_get(fmt->module)) | 1380 | if (!try_module_get(fmt->module)) |
1381 | continue; | 1381 | continue; |
1382 | read_unlock(&binfmt_lock); | 1382 | read_unlock(&binfmt_lock); |
1383 | retval = fn(bprm, current_pt_regs()); | 1383 | retval = fn(bprm); |
1384 | /* | 1384 | /* |
1385 | * Restore the depth counter to its starting value | 1385 | * Restore the depth counter to its starting value |
1386 | * in this call, so we don't have to rely on every | 1386 | * in this call, so we don't have to rely on every |