File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed
tools/testing/selftests/lkdtm Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ void lkdtm_ARRAY_BOUNDS(void)
267
267
kfree (not_checked );
268
268
kfree (checked );
269
269
pr_err ("FAIL: survived array bounds overflow!\n" );
270
+ pr_expected_config (CONFIG_UBSAN_BOUNDS );
270
271
}
271
272
272
273
void lkdtm_CORRUPT_LIST_ADD (void )
Original file line number Diff line number Diff line change @@ -6,3 +6,5 @@ CONFIG_HARDENED_USERCOPY=y
6
6
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
7
7
CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y
8
8
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
9
+ CONFIG_UBSAN_BOUNDS=y
10
+ CONFIG_UBSAN_TRAP=y
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ EXCEPTION
7
7
#EXHAUST_STACK Corrupts memory on failure
8
8
#CORRUPT_STACK Crashes entire system on success
9
9
#CORRUPT_STACK_STRONG Crashes entire system on success
10
+ ARRAY_BOUNDS
10
11
CORRUPT_LIST_ADD list_add corruption
11
12
CORRUPT_LIST_DEL list_del corruption
12
13
STACK_GUARD_PAGE_LEADING
You can’t perform that action at this time.
0 commit comments