]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
exec: Rename flush_old_exec begin_new_exec
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 3 May 2020 12:54:10 +0000 (07:54 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 7 May 2020 21:55:47 +0000 (16:55 -0500)
There is and has been for a very long time been a lot more going on in
flush_old_exec than just flushing the old state.  After the movement
of code from setup_new_exec there is a whole lot more going on than
just flushing the old executables state.

Rename flush_old_exec to begin_new_exec to more accurately reflect
what this function does.

Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Documentation/trace/ftrace.rst
arch/x86/ia32/ia32_aout.c
fs/binfmt_aout.c
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/binfmt_flat.c
fs/exec.c
include/linux/binfmts.h

index 3b5614b1d1a57f61aebe56dbfca463ab1ebfcdc6..430a16283103d4e4f06d4ddfa8e4b0a971bf174e 100644 (file)
@@ -1524,7 +1524,7 @@ display-graph option::
    => remove_vma
    => exit_mmap
    => mmput
-   => flush_old_exec
+   => begin_new_exec
    => load_elf_binary
    => search_binary_handler
    => __do_execve_file.isra.32
index 8255fdc3a027c2afcb9f1b244c92a325ea6f2d5e..385d3d172ee14105e800f9b73e776118e35fad83 100644 (file)
@@ -131,7 +131,7 @@ static int load_aout_binary(struct linux_binprm *bprm)
                return -ENOMEM;
 
        /* Flush all traces of the currently running executable */
-       retval = flush_old_exec(bprm);
+       retval = begin_new_exec(bprm);
        if (retval)
                return retval;
 
index c8ba28f285e575bda447c50fb0e4c74b93139cbe..3e84e9bb908405eb61070b9040e66d9fe4339842 100644 (file)
@@ -151,7 +151,7 @@ static int load_aout_binary(struct linux_binprm * bprm)
                return -ENOMEM;
 
        /* Flush all traces of the currently running executable */
-       retval = flush_old_exec(bprm);
+       retval = begin_new_exec(bprm);
        if (retval)
                return retval;
 
index e6b58662303540adb13365628b01e33b1516d607..396d5c2e6b5e69e035aeda69ab78bf48f56997fd 100644 (file)
@@ -844,7 +844,7 @@ out_free_interp:
                goto out_free_dentry;
 
        /* Flush all traces of the currently running executable */
-       retval = flush_old_exec(bprm);
+       retval = begin_new_exec(bprm);
        if (retval)
                goto out_free_dentry;
 
index 9a1aa61b4cc3c6e204afc1d6dfca9ac9c6a18c4c..896e3ca9bf85268dfb5bb919cfb53244f440fe54 100644 (file)
@@ -338,7 +338,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
                interp_params.flags |= ELF_FDPIC_FLAG_CONSTDISP;
 
        /* flush all traces of the currently running executable */
-       retval = flush_old_exec(bprm);
+       retval = begin_new_exec(bprm);
        if (retval)
                goto error;
 
index 252878969582abbded335bf8aef7cd295708cce0..9b82bc111d0a0086cc8d9f3407ad72cc18a55b69 100644 (file)
@@ -534,7 +534,7 @@ static int load_flat_file(struct linux_binprm *bprm,
 
        /* Flush all traces of the currently running executable */
        if (id == 0) {
-               ret = flush_old_exec(bprm);
+               ret = begin_new_exec(bprm);
                if (ret)
                        goto err;
 
index 0eff205587350c7f215ce1775901f94a64b8f67e..3cc40048cc650d18870c5b0cef6b2eb44792efe0 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1298,7 +1298,7 @@ void __set_task_comm(struct task_struct *tsk, const char *buf, bool exec)
  * signal (via de_thread() or coredump), or will have SEGV raised
  * (after exec_mmap()) by search_binary_handlers (see below).
  */
-int flush_old_exec(struct linux_binprm * bprm)
+int begin_new_exec(struct linux_binprm * bprm)
 {
        struct task_struct *me = current;
        int retval;
@@ -1433,7 +1433,7 @@ out_unlock:
 out:
        return retval;
 }
-EXPORT_SYMBOL(flush_old_exec);
+EXPORT_SYMBOL(begin_new_exec);
 
 void would_dump(struct linux_binprm *bprm, struct file *file)
 {
index 2a8fddf3574aec347c66c429f862299d0bc11c5b..1b48e2154766ae579cad4b7a454376040f317247 100644 (file)
@@ -125,7 +125,7 @@ extern void unregister_binfmt(struct linux_binfmt *);
 extern int prepare_binprm(struct linux_binprm *);
 extern int __must_check remove_arg_zero(struct linux_binprm *);
 extern int search_binary_handler(struct linux_binprm *);
-extern int flush_old_exec(struct linux_binprm * bprm);
+extern int begin_new_exec(struct linux_binprm * bprm);
 extern void setup_new_exec(struct linux_binprm * bprm);
 extern void finalize_exec(struct linux_binprm *bprm);
 extern void would_dump(struct linux_binprm *, struct file *);