diff options
author | Kees Cook <keescook@chromium.org> | 2021-08-18 19:48:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-18 22:28:51 +0200 |
commit | c75be56e35b2eef824a2ac8d90a98f9e65b28efa (patch) | |
tree | 6205254a511f82d28093fe580ce75801d9bfc2b7 /drivers/misc/lkdtm/bugs.c | |
parent | firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()' (diff) | |
download | linux-c75be56e35b2eef824a2ac8d90a98f9e65b28efa.tar.xz linux-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: kernelci@groups.io
Suggested-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210818174855.2307828-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/lkdtm/bugs.c')
-rw-r--r-- | drivers/misc/lkdtm/bugs.c | 1 |
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) |