exec: Distinguish in_execve from in_exec
authorKees Cook <keescook@chromium.org>
Wed, 24 Jan 2024 19:15:33 +0000 (11:15 -0800)
committerKees Cook <keescook@chromium.org>
Wed, 24 Jan 2024 19:48:52 +0000 (11:48 -0800)
commit90383cc07895183c75a0db2460301c2ffd912359
treeca41f9d32f052e063b48e864ac60171b55c300b5
parent84c39ec57d409e803a9bb6e4e85daf1243e0e80b
exec: Distinguish in_execve from in_exec

Just to help distinguish the fs->in_exec flag from the current->in_execve
flag, add comments in check_unsafe_exec() and copy_fs() for more
context. Also note that in_execve is only used by TOMOYO now.

Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/exec.c
include/linux/sched.h
kernel/fork.c