summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorAlexander Popov2018-08-17 00:17:01 +0200
committerKees Cook2018-09-04 19:35:48 +0200
commitc8d126275a5fa59394fe17109bdb9812fed296b8 (patch)
tree81be08434798afffb46681c2625c0d16e4e188cc /include/linux/sched.h
parentlkdtm: Add a test for STACKLEAK (diff)
downloadkernel-qcow2-linux-c8d126275a5fa59394fe17109bdb9812fed296b8.tar.gz
kernel-qcow2-linux-c8d126275a5fa59394fe17109bdb9812fed296b8.tar.xz
kernel-qcow2-linux-c8d126275a5fa59394fe17109bdb9812fed296b8.zip
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>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c1a23acd24e7..ae9d10e14b82 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1194,6 +1194,7 @@ struct task_struct {
#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
unsigned long lowest_stack;
+ unsigned long prev_lowest_stack;
#endif
/*