lkdtm: Add REPORT_STACK for checking stack offsets
authorKees Cook <keescook@chromium.org>
Thu, 1 Apr 2021 23:23:47 +0000 (16:23 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Apr 2021 12:05:20 +0000 (14:05 +0200)
commit68ef8735d253f3d840082b78f996bf2d89ee6e5f
tree56d0efc5657399b907ca874ddea2a8140c3976e9
parentfe950f6020338c8ac668ef823bb692d36b7542a2
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
drivers/misc/lkdtm/bugs.c
drivers/misc/lkdtm/core.c
drivers/misc/lkdtm/lkdtm.h
tools/testing/selftests/lkdtm/.gitignore
tools/testing/selftests/lkdtm/Makefile
tools/testing/selftests/lkdtm/stack-entropy.sh [new file with mode: 0755]