fs/proc: Show STACKLEAK metrics in the /proc file system
authorAlexander Popov <alex.popov@linux.com>
Thu, 16 Aug 2018 22:17:01 +0000 (01:17 +0300)
committerKees Cook <keescook@chromium.org>
Tue, 4 Sep 2018 17:35:48 +0000 (10:35 -0700)
commitc8d126275a5fa59394fe17109bdb9812fed296b8
tree81be08434798afffb46681c2625c0d16e4e188cc
parentf90d1e0c7804b52e12fea501aa46a12c1ff6a567
fs/proc: Show STACKLEAK metrics in the /proc file system

Introduce CONFIG_STACKLEAK_METRICS providing STACKLEAK information about
tasks via the /proc file system. In particular, /proc/<pid>/stack_depth
shows the maximum kernel stack consumption for the current and previous
syscalls. Although this information is not precise, it can be useful for
estimating the STACKLEAK performance impact for your workloads.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alexander Popov <alex.popov@linux.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/proc/base.c
include/linux/sched.h
include/linux/stackleak.h
kernel/stackleak.c
scripts/gcc-plugins/Kconfig