Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\exec.c Create Date:2022-07-28 20:04:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Calling this is the point of no return. None of the failures will be* seen by userspace since either the process is already taking a fatal* signal (via de_thread() or coredump), or will have SEGV raised

Proto:int flush_old_exec(struct linux_binprm *bprm)

Type:int

Parameter:

TypeParameterName
struct linux_binprm *bprm
1265  retval = This function makes sure the current process has its own signal table,* so that flush_signal_handlers can later reset the handlers without* disturbing other processes. (Other processes might share the signal* table via the CLONE_SIGHAND option to clone().)
1266  If retval Then Go to out
1274  set_mm_exe_file - change a reference to the mm's executable file* This changes mm's executable file (shown as symlink /proc/[pid]/exe)
1279  The nascent bprm->mm is not visible until exec_mmap() but it can* use a lot of memory, account these pages in current->mm temporary* for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we* change the counter back via acct_arg_size(0).
1280  retval = exec_mmap(mm)
1281  If retval Then Go to out
1290  mm = NULL
1292  set_fs(USER_DS)
1293  flags &= ~( Randomize virtual address space | Forked but didn't exec | I am a kernel thread | This thread should not be frozen | Userland is not allowed to meddle with cpus_mask )
1295  flush_thread()
1296  personality &= ~per_clear
1304  do_close_on_exec(files)
1305  Return 0
1307  out :
1308  Return retval
Caller
NameDescribe
load_aout_binaryThese are the functions used to load a.out style executables and shared* libraries. There is no binary dependent code anywhere else.
load_elf_binary
load_elf_fdpic_binaryload an fdpic binary into various bits of memory
load_flat_file