diff options
| author | Eric W. Biederman <[email protected]> | 2020-05-09 08:50:36 -0500 |
|---|---|---|
| committer | Eric W. Biederman <[email protected]> | 2020-05-09 08:50:36 -0500 |
| commit | b213c2dcbcbc138d111f150e13317ea50002cab5 (patch) | |
| tree | 8b1c0c2c346e39f9af285f29a46bc5abd4450f6d /kernel | |
| parent | 6a8b55ed4056ea5559ebe4f6a4b247f627870d4c (diff) | |
| parent | 2388777a0a5957a10b3d78677216530a9b3bd09f (diff) | |
exec: Promised cleanups after introducing exec_update_mutex
In the patchset that introduced exec_update_mutex there were a few last
minute discoveries and fixes that left the code in a state that can
be very easily be improved.
During the merge window we discussed the first three of these patches
and I promised I would resend them.
What the first patch does is it makes the the calls in the binfmts:
flush_old_exec();
/* set the personality */
setup_new_exec();
install_exec_creds();
With no sleeps or anything in between.
At the conclusion of this set of changes the the calls in the binfmts
are:
begin_new_exec();
/* set the personality */
setup_new_exec();
The intent is to make the code easier to follow and easier to change.
Eric W. Biederman (7):
binfmt: Move install_exec_creds after setup_new_exec to match binfmt_elf
exec: Make unlocking exec_update_mutex explict
exec: Rename the flag called_exec_mmap point_of_no_return
exec: Merge install_exec_creds into setup_new_exec
exec: In setup_new_exec cache current in the local variable me
exec: Move most of setup_new_exec into flush_old_exec
exec: Rename flush_old_exec begin_new_exec
Documentation/trace/ftrace.rst | 2 +-
arch/x86/ia32/ia32_aout.c | 4 +-
fs/binfmt_aout.c | 3 +-
fs/binfmt_elf.c | 3 +-
fs/binfmt_elf_fdpic.c | 3 +-
fs/binfmt_flat.c | 4 +-
fs/exec.c | 162 ++++++++++++++++++++---------------------
include/linux/binfmts.h | 10 +--
kernel/events/core.c | 2 +-
9 files changed, 92 insertions(+), 101 deletions(-)
Link: https://lkml.kernel.org/r/[email protected]
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Greg Ungerer <[email protected]>
Signed-off-by: "Eric W. Biederman" <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/events/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 633b4ae72ed5..169449b5e56b 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -12217,7 +12217,7 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn) * When a child task exits, feed back event values to parent events. * * Can be called with exec_update_mutex held when called from - * install_exec_creds(). + * setup_new_exec(). */ void perf_event_exit_task(struct task_struct *child) { |