aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/lkdtm/bugs.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2021-08-18 17:48:52 +0000
committerGreg Kroah-Hartman <[email protected]>2021-08-18 20:28:51 +0000
commitc75be56e35b2eef824a2ac8d90a98f9e65b28efa (patch)
tree6205254a511f82d28093fe580ce75801d9bfc2b7 /drivers/misc/lkdtm/bugs.c
parentfirmware: raspberrypi: Fix a leak in 'rpi_firmware_get()' (diff)
downloadkernel-c75be56e35b2eef824a2ac8d90a98f9e65b28efa.tar.gz
kernel-c75be56e35b2eef824a2ac8d90a98f9e65b28efa.zip
lkdtm/bugs: Add ARRAY_BOUNDS to selftests
Add CONFIG hints about why the ARRAY_BOUNDS test might fail, and similarly include the CONFIGs needed to pass the ARRAY_BOUNDS test via the selftests, and add to selftests. Cc: [email protected] Suggested-by: Guillaume Tucker <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/misc/lkdtm/bugs.c')
-rw-r--r--drivers/misc/lkdtm/bugs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c
index 88c218a9f8b3..03171e412356 100644
--- a/drivers/misc/lkdtm/bugs.c
+++ b/drivers/misc/lkdtm/bugs.c
@@ -267,6 +267,7 @@ void lkdtm_ARRAY_BOUNDS(void)
kfree(not_checked);
kfree(checked);
pr_err("FAIL: survived array bounds overflow!\n");
+ pr_expected_config(CONFIG_UBSAN_BOUNDS);
}
void lkdtm_CORRUPT_LIST_ADD(void)