scs: Add support for stack usage debugging
authorSami Tolvanen <samitolvanen@google.com>
Mon, 27 Apr 2020 16:00:09 +0000 (09:00 -0700)
committerWill Deacon <will@kernel.org>
Fri, 15 May 2020 15:35:49 +0000 (16:35 +0100)
commit5bbaf9d1fcb9be696ee9a61636ab6803556c70f2
tree6654b089420824522d0f304575400dceffc70707
parent628d06a48f57c36abdc2a024930212e654a501b7
scs: Add support for stack usage debugging

Implements CONFIG_DEBUG_STACK_USAGE for shadow stacks. When enabled,
also prints out the highest shadow stack usage per process.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
[will: rewrote most of scs_check_usage()]
Signed-off-by: Will Deacon <will@kernel.org>
kernel/scs.c