summaryrefslogtreecommitdiff
path: root/drivers/misc/lkdtm/core.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2021-04-01 16:23:47 -0700
committerThomas Gleixner <tglx@linutronix.de>2021-04-08 14:05:20 +0200
commit68ef8735d253f3d840082b78f996bf2d89ee6e5f (patch)
tree56d0efc5657399b907ca874ddea2a8140c3976e9 /drivers/misc/lkdtm/core.c
parentfe950f6020338c8ac668ef823bb692d36b7542a2 (diff)
lkdtm: Add REPORT_STACK for checking stack offsets
For validating the stack offset behavior, report the offset from a given process's first seen stack address. Add s script to calculate the results to the LKDTM kselftests. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210401232347.2791257-7-keescook@chromium.org
Diffstat (limited to 'drivers/misc/lkdtm/core.c')
-rw-r--r--drivers/misc/lkdtm/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
index b2aff4d87c01..8024b6a5cc7f 100644
--- a/drivers/misc/lkdtm/core.c
+++ b/drivers/misc/lkdtm/core.c
@@ -110,6 +110,7 @@ static const struct crashtype crashtypes[] = {
CRASHTYPE(EXHAUST_STACK),
CRASHTYPE(CORRUPT_STACK),
CRASHTYPE(CORRUPT_STACK_STRONG),
+ CRASHTYPE(REPORT_STACK),
CRASHTYPE(CORRUPT_LIST_ADD),
CRASHTYPE(CORRUPT_LIST_DEL),
CRASHTYPE(STACK_GUARD_PAGE_LEADING),