diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 01:34:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 01:34:18 -0500 |
commit | 9bc9ccd7db1c9f043f75380b5a5b94912046a60e (patch) | |
tree | dd0a1b3396ae9414f668b0110cc39d11268ad3ed /fs/binfmt_aout.c | |
parent | f0230294271f511b41797305b685365a9e569a09 (diff) | |
parent | bdd3536618443809d18868563eeafa63b9d29603 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
"All kinds of stuff this time around; some more notable parts:
- RCU'd vfsmounts handling
- new primitives for coredump handling
- files_lock is gone
- Bruce's delegations handling series
- exportfs fixes
plus misc stuff all over the place"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits)
ecryptfs: ->f_op is never NULL
locks: break delegations on any attribute modification
locks: break delegations on link
locks: break delegations on rename
locks: helper functions for delegation breaking
locks: break delegations on unlink
namei: minor vfs_unlink cleanup
locks: implement delegations
locks: introduce new FL_DELEG lock flag
vfs: take i_mutex on renamed file
vfs: rename I_MUTEX_QUOTA now that it's not used for quotas
vfs: don't use PARENT/CHILD lock classes for non-directories
vfs: pull ext4's double-i_mutex-locking into common code
exportfs: fix quadratic behavior in filehandle lookup
exportfs: better variable name
exportfs: move most of reconnect_path to helper function
exportfs: eliminate unused "noprogress" counter
exportfs: stop retrying once we race with rename/remove
exportfs: clear DISCONNECTED on all parents sooner
exportfs: more detailed comment for path_reconnect
...
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r-- | fs/binfmt_aout.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f789a4..ca0ba15a7306 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -45,7 +45,6 @@ static int load_aout_library(struct file*); | |||
45 | */ | 45 | */ |
46 | static int aout_core_dump(struct coredump_params *cprm) | 46 | static int aout_core_dump(struct coredump_params *cprm) |
47 | { | 47 | { |
48 | struct file *file = cprm->file; | ||
49 | mm_segment_t fs; | 48 | mm_segment_t fs; |
50 | int has_dumped = 0; | 49 | int has_dumped = 0; |
51 | void __user *dump_start; | 50 | void __user *dump_start; |
@@ -85,10 +84,10 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
85 | 84 | ||
86 | set_fs(KERNEL_DS); | 85 | set_fs(KERNEL_DS); |
87 | /* struct user */ | 86 | /* struct user */ |
88 | if (!dump_write(file, &dump, sizeof(dump))) | 87 | if (!dump_emit(cprm, &dump, sizeof(dump))) |
89 | goto end_coredump; | 88 | goto end_coredump; |
90 | /* Now dump all of the user data. Include malloced stuff as well */ | 89 | /* Now dump all of the user data. Include malloced stuff as well */ |
91 | if (!dump_seek(cprm->file, PAGE_SIZE - sizeof(dump))) | 90 | if (!dump_skip(cprm, PAGE_SIZE - sizeof(dump))) |
92 | goto end_coredump; | 91 | goto end_coredump; |
93 | /* now we start writing out the user space info */ | 92 | /* now we start writing out the user space info */ |
94 | set_fs(USER_DS); | 93 | set_fs(USER_DS); |
@@ -96,14 +95,14 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
96 | if (dump.u_dsize != 0) { | 95 | if (dump.u_dsize != 0) { |
97 | dump_start = START_DATA(dump); | 96 | dump_start = START_DATA(dump); |
98 | dump_size = dump.u_dsize << PAGE_SHIFT; | 97 | dump_size = dump.u_dsize << PAGE_SHIFT; |
99 | if (!dump_write(file, dump_start, dump_size)) | 98 | if (!dump_emit(cprm, dump_start, dump_size)) |
100 | goto end_coredump; | 99 | goto end_coredump; |
101 | } | 100 | } |
102 | /* Now prepare to dump the stack area */ | 101 | /* Now prepare to dump the stack area */ |
103 | if (dump.u_ssize != 0) { | 102 | if (dump.u_ssize != 0) { |
104 | dump_start = START_STACK(dump); | 103 | dump_start = START_STACK(dump); |
105 | dump_size = dump.u_ssize << PAGE_SHIFT; | 104 | dump_size = dump.u_ssize << PAGE_SHIFT; |
106 | if (!dump_write(file, dump_start, dump_size)) | 105 | if (!dump_emit(cprm, dump_start, dump_size)) |
107 | goto end_coredump; | 106 | goto end_coredump; |
108 | } | 107 | } |
109 | end_coredump: | 108 | end_coredump: |
@@ -221,7 +220,7 @@ static int load_aout_binary(struct linux_binprm * bprm) | |||
221 | * Requires a mmap handler. This prevents people from using a.out | 220 | * Requires a mmap handler. This prevents people from using a.out |
222 | * as part of an exploit attack against /proc-related vulnerabilities. | 221 | * as part of an exploit attack against /proc-related vulnerabilities. |
223 | */ | 222 | */ |
224 | if (!bprm->file->f_op || !bprm->file->f_op->mmap) | 223 | if (!bprm->file->f_op->mmap) |
225 | return -ENOEXEC; | 224 | return -ENOEXEC; |
226 | 225 | ||
227 | fd_offset = N_TXTOFF(ex); | 226 | fd_offset = N_TXTOFF(ex); |
@@ -374,7 +373,7 @@ static int load_aout_library(struct file *file) | |||
374 | * Requires a mmap handler. This prevents people from using a.out | 373 | * Requires a mmap handler. This prevents people from using a.out |
375 | * as part of an exploit attack against /proc-related vulnerabilities. | 374 | * as part of an exploit attack against /proc-related vulnerabilities. |
376 | */ | 375 | */ |
377 | if (!file->f_op || !file->f_op->mmap) | 376 | if (!file->f_op->mmap) |
378 | goto out; | 377 | goto out; |
379 | 378 | ||
380 | if (N_FLAGS(ex)) | 379 | if (N_FLAGS(ex)) |