Skip to contentSkip to conversation

selftests/lkdtm: Remove dead config option

PATCH In review Muhammad Usama Anjum 2 participants 4 messages Jan 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 selftests/lkdtm: Remove dead config option

CONFIG_HARDENED_USERCOPY_FALLBACK config option has been removed in commit 53944f171a89 ("mm: remove HARDENED_USERCOPY_FALLBACK"). Remove it from the lkdtm selftest config.

---
 tools/testing/selftests/lkdtm/config | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/lkdtm/config +0 -1
index a26a3fa9e9255..a7a58f885f52a 100644
@@ -3,7 +3,6 @@ CONFIG_DEBUG_LIST=y
 CONFIG_SLAB_FREELIST_HARDENED=y
 CONFIG_FORTIFY_SOURCE=y
 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_BOUNDS=y
Signature · 1 line
2.30.2
#1 lore raw

PATCH v2 2/2 selftests/lkdtm: Add UBSAN config

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")

---
Changes in V2:
Add Fixes tag

---
 tools/testing/selftests/lkdtm/config | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/lkdtm/config +1 -0
index a7a58f885f52a..46f39ee762086 100644
@@ -5,6 +5,7 @@ CONFIG_FORTIFY_SOURCE=y
 CONFIG_HARDENED_USERCOPY=y
 CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y
 CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
+CONFIG_UBSAN=y
 CONFIG_UBSAN_BOUNDS=y
 CONFIG_UBSAN_TRAP=y
 CONFIG_STACKPROTECTOR_STRONG=y
Signature · 1 line
2.30.2
Acked-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config

Quoted 9 lines · Muhammad Usama Anjum

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:

Quoted 8 lines

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")
Signature · 1 line
Kees Cook