linux/security/tomoyo
Eric W. Biederman be619f7f06 exec: Implement kernel_execve
To allow the kernel not to play games with set_fs to call exec
implement kernel_execve.  The function kernel_execve takes pointers
into kernel memory and copies the values pointed to onto the new
userspace stack.

The calls with arguments from kernel space of do_execve are replaced
with calls to kernel_execve.

The calls do_execve and do_execveat are made static as there are now
no callers outside of exec.

The comments that mention do_execve are updated to refer to
kernel_execve or execve depending on the circumstances.  In addition
to correcting the comments, this makes it easy to grep for do_execve
and verify it is not used.

Inspired-by: https://lkml.kernel.org/r/20200627072704.2447163-1-hch@lst.de
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/87wo365ikj.fsf@x220.int.ebiederm.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2020-07-21 08:24:52 -05:00
..
policy tomoyo: Do not generate empty policy files 2015-04-07 21:27:45 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
audit.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
common.c One patch for suppressing coccicheck's warning. 2020-06-02 17:12:07 -07:00
common.h exec: Implement kernel_execve 2020-07-21 08:24:52 -05:00
condition.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
domain.c exec: Implement kernel_execve 2020-07-21 08:24:52 -05:00
environ.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
file.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
gc.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
group.c tomoyo: Suppress RCU warning at list_for_each_entry_rcu(). 2019-12-16 23:02:27 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
load_policy.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
Makefile kbuild: move bin2c back to scripts/ from scripts/basic/ 2018-07-18 01:18:05 +09:00
memory.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
mount.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
network.c tomoyo: Check address length before reading address family 2019-05-10 14:58:25 -07:00
realpath.c proc: proc_pid_ns takes super_block as an argument 2020-05-19 07:07:50 -05:00
securityfs_if.c tomoyo: Coding style fix. 2019-01-24 14:50:27 -08:00
tomoyo.c exec: Implement kernel_execve 2020-07-21 08:24:52 -05:00
util.c tomoyo: Suppress RCU warning at list_for_each_entry_rcu(). 2019-12-16 23:02:27 +09:00