Skip to content

Commit 2388777

Browse files
committed
exec: Rename flush_old_exec begin_new_exec
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 <[email protected]> Reviewed-by: Greg Ungerer <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
1 parent df9e4d2 commit 2388777

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

Documentation/trace/ftrace.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ display-graph option::
15241524
=> remove_vma
15251525
=> exit_mmap
15261526
=> mmput
1527-
=> flush_old_exec
1527+
=> begin_new_exec
15281528
=> load_elf_binary
15291529
=> search_binary_handler
15301530
=> __do_execve_file.isra.32

arch/x86/ia32/ia32_aout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int load_aout_binary(struct linux_binprm *bprm)
131131
return -ENOMEM;
132132

133133
/* Flush all traces of the currently running executable */
134-
retval = flush_old_exec(bprm);
134+
retval = begin_new_exec(bprm);
135135
if (retval)
136136
return retval;
137137

fs/binfmt_aout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static int load_aout_binary(struct linux_binprm * bprm)
151151
return -ENOMEM;
152152

153153
/* Flush all traces of the currently running executable */
154-
retval = flush_old_exec(bprm);
154+
retval = begin_new_exec(bprm);
155155
if (retval)
156156
return retval;
157157

fs/binfmt_elf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
844844
goto out_free_dentry;
845845

846846
/* Flush all traces of the currently running executable */
847-
retval = flush_old_exec(bprm);
847+
retval = begin_new_exec(bprm);
848848
if (retval)
849849
goto out_free_dentry;
850850

fs/binfmt_elf_fdpic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
338338
interp_params.flags |= ELF_FDPIC_FLAG_CONSTDISP;
339339

340340
/* flush all traces of the currently running executable */
341-
retval = flush_old_exec(bprm);
341+
retval = begin_new_exec(bprm);
342342
if (retval)
343343
goto error;
344344

fs/binfmt_flat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static int load_flat_file(struct linux_binprm *bprm,
534534

535535
/* Flush all traces of the currently running executable */
536536
if (id == 0) {
537-
ret = flush_old_exec(bprm);
537+
ret = begin_new_exec(bprm);
538538
if (ret)
539539
goto err;
540540

fs/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ void __set_task_comm(struct task_struct *tsk, const char *buf, bool exec)
12981298
* signal (via de_thread() or coredump), or will have SEGV raised
12991299
* (after exec_mmap()) by search_binary_handlers (see below).
13001300
*/
1301-
int flush_old_exec(struct linux_binprm * bprm)
1301+
int begin_new_exec(struct linux_binprm * bprm)
13021302
{
13031303
struct task_struct *me = current;
13041304
int retval;
@@ -1433,7 +1433,7 @@ int flush_old_exec(struct linux_binprm * bprm)
14331433
out:
14341434
return retval;
14351435
}
1436-
EXPORT_SYMBOL(flush_old_exec);
1436+
EXPORT_SYMBOL(begin_new_exec);
14371437

14381438
void would_dump(struct linux_binprm *bprm, struct file *file)
14391439
{

include/linux/binfmts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extern void unregister_binfmt(struct linux_binfmt *);
125125
extern int prepare_binprm(struct linux_binprm *);
126126
extern int __must_check remove_arg_zero(struct linux_binprm *);
127127
extern int search_binary_handler(struct linux_binprm *);
128-
extern int flush_old_exec(struct linux_binprm * bprm);
128+
extern int begin_new_exec(struct linux_binprm * bprm);
129129
extern void setup_new_exec(struct linux_binprm * bprm);
130130
extern void finalize_exec(struct linux_binprm *bprm);
131131
extern void would_dump(struct linux_binprm *, struct file *);

0 commit comments

Comments
 (0)