summaryrefslogtreecommitdiff
path: root/drivers/misc/lkdtm_core.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-08-04 13:04:21 -0700
committerKees Cook <keescook@chromium.org>2017-08-04 13:04:21 -0700
commit7b25a85c9d9f796c5be7ad3fb8b9553d3e2ed958 (patch)
tree8917e901a8728c16f8e848227fbd6e3601019830 /drivers/misc/lkdtm_core.c
parentc7fea48876773603721f545f8c1a2f894291ef85 (diff)
lkdtm: Test VMAP_STACK allocates leading/trailing guard pages
Two new tests STACK_GUARD_PAGE_LEADING and STACK_GUARD_PAGE_TRAILING attempt to read the byte before and after, respectively, of the current stack frame, which should fault. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/misc/lkdtm_core.c')
-rw-r--r--drivers/misc/lkdtm_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm_core.c b/drivers/misc/lkdtm_core.c
index 51decc07eeda..9e98d7ef5503 100644
--- a/drivers/misc/lkdtm_core.c
+++ b/drivers/misc/lkdtm_core.c
@@ -201,6 +201,8 @@ struct crashtype crashtypes[] = {
CRASHTYPE(CORRUPT_LIST_DEL),
CRASHTYPE(CORRUPT_USER_DS),
CRASHTYPE(CORRUPT_STACK),
+ CRASHTYPE(STACK_GUARD_PAGE_LEADING),
+ CRASHTYPE(STACK_GUARD_PAGE_TRAILING),
CRASHTYPE(UNALIGNED_LOAD_STORE_WRITE),
CRASHTYPE(OVERWRITE_ALLOCATION),
CRASHTYPE(WRITE_AFTER_FREE),