exec: Add comments on check_unsafe_exec() fs counting
authorKees Cook <keescook@chromium.org>
Tue, 18 Oct 2022 07:17:24 +0000 (00:17 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 25 Oct 2022 22:17:08 +0000 (15:17 -0700)
commit275498a98b1fe77deebddfc4f8986c0cf2c3ced7
tree1592dd1311d98d4ce94476d0209871e59fc32e93
parent23a7aea5faf6500051c52dfaba46845c41b3abd4
exec: Add comments on check_unsafe_exec() fs counting

Add some comments about what the fs counting is doing in
check_unsafe_exec() and how it relates to the call graph.
Specifically, we can't force an unshare of the fs because
of at least Chrome:
https://lore.kernel.org/lkml/86CE201B-5632-4BB7-BCF6-7CB2C2895409@chromium.org/

Cc: Eric Biederman <ebiederm@xmission.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Link: https://lore.kernel.org/r/20221018071537.never.662-kees@kernel.org
fs/exec.c