summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2022-01-21 17:51:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-08 15:23:18 +0300
commit34dd193d2329cc9b3d0db1cfd9fa6569b130aaff (patch)
treeb01b331d96b73d8ae11199670bab61bf948c0644 /tools
parentf58159509b6251a2f80e281dffb8be338ed3c039 (diff)
downloadlinux-34dd193d2329cc9b3d0db1cfd9fa6569b130aaff.tar.xz
selftests/lkdtm: Add UBSAN config
[ Upstream commit 1900be289b598b2c553b3add13e491c0bb8a8550 ] UBSAN_BOUNDS and UBSAN_TRAP depend on UBSAN config option. merge_config.sh script generates following warnings if parent config doesn't have UBSAN config already enabled and UBSAN_BOUNDS/UBSAN_TRAP config options don't get added to the parent config. Value requested for CONFIG_UBSAN_BOUNDS not in final .config Requested value: CONFIG_UBSAN_BOUNDS=y Actual value: Value requested for CONFIG_UBSAN_TRAP not in final .config Requested value: CONFIG_UBSAN_TRAP=y Actual value: Fix this by including UBSAN config. Fixes: c75be56e35b2 ("lkdtm/bugs: Add ARRAY_BOUNDS to selftests") Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/lkdtm/config1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/lkdtm/config b/tools/testing/selftests/lkdtm/config
index 38edea25631b..b642411ceb6c 100644
--- a/tools/testing/selftests/lkdtm/config
+++ b/tools/testing/selftests/lkdtm/config
@@ -6,5 +6,6 @@ CONFIG_HARDENED_USERCOPY=y
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
+CONFIG_UBSAN=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_TRAP=y