execve

References:

[1] How programs get run. LWN.net, 2015. [link1, link2]

Load ELF binary

In fs/binfmt_elf.c: load_elf_binary(): examining ELF header.

flush_old_exec(): clears up state in kernel that refers to the previous program.

setup_new_exec(): set up kernel’s internal state for the new program. flush_signal_handlers() sets up the signal handlers for the new program. do_close_on_exec() closes all of the old program’s file descriptors.

Set up the virtual memory of the new program. The highest address for the stack is moved downward by a random offset. create_elf_tables()

Created Jul 5, 2019 // Last Updated Aug 10, 2019

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?