All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] selftests/lkdtm: Remove dead config option
@ 2022-01-21 14:51 Muhammad Usama Anjum
  2022-01-21 14:51 ` [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config Muhammad Usama Anjum
  2022-01-21 21:17 ` [PATCH v2 1/2] selftests/lkdtm: Remove dead config option Kees Cook
  0 siblings, 2 replies; 4+ messages in thread
From: Muhammad Usama Anjum @ 2022-01-21 14:51 UTC (permalink / raw)
  To: Kees Cook, Shuah Khan
  Cc: Muhammad Usama Anjum, kernel, linux-kselftest, linux-kernel

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

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
 tools/testing/selftests/lkdtm/config | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/lkdtm/config b/tools/testing/selftests/lkdtm/config
index a26a3fa9e9255..a7a58f885f52a 100644
--- a/tools/testing/selftests/lkdtm/config
+++ b/tools/testing/selftests/lkdtm/config
@@ -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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config
  2022-01-21 14:51 [PATCH v2 1/2] selftests/lkdtm: Remove dead config option Muhammad Usama Anjum
@ 2022-01-21 14:51 ` Muhammad Usama Anjum
  2022-01-21 21:17   ` Kees Cook
  2022-01-21 21:17 ` [PATCH v2 1/2] selftests/lkdtm: Remove dead config option Kees Cook
  1 sibling, 1 reply; 4+ messages in thread
From: Muhammad Usama Anjum @ 2022-01-21 14:51 UTC (permalink / raw)
  To: Kees Cook, Shuah Khan, Greg Kroah-Hartman
  Cc: Muhammad Usama Anjum, kernel, linux-kselftest, linux-kernel

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>
---
Changes in V2:
	Add Fixes tag
---
 tools/testing/selftests/lkdtm/config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/lkdtm/config b/tools/testing/selftests/lkdtm/config
index a7a58f885f52a..46f39ee762086 100644
--- a/tools/testing/selftests/lkdtm/config
+++ b/tools/testing/selftests/lkdtm/config
@@ -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
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] selftests/lkdtm: Remove dead config option
  2022-01-21 14:51 [PATCH v2 1/2] selftests/lkdtm: Remove dead config option Muhammad Usama Anjum
  2022-01-21 14:51 ` [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config Muhammad Usama Anjum
@ 2022-01-21 21:17 ` Kees Cook
  1 sibling, 0 replies; 4+ messages in thread
From: Kees Cook @ 2022-01-21 21:17 UTC (permalink / raw)
  To: Muhammad Usama Anjum; +Cc: Shuah Khan, kernel, linux-kselftest, linux-kernel

On Fri, Jan 21, 2022 at 07:51:52PM +0500, Muhammad Usama Anjum wrote:
> CONFIG_HARDENED_USERCOPY_FALLBACK config option has been removed in
> commit 53944f171a89 ("mm: remove HARDENED_USERCOPY_FALLBACK"). Remove it
> from the lkdtm selftest config.
> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

Acked-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config
  2022-01-21 14:51 ` [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config Muhammad Usama Anjum
@ 2022-01-21 21:17   ` Kees Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2022-01-21 21:17 UTC (permalink / raw)
  To: Muhammad Usama Anjum
  Cc: Shuah Khan, Greg Kroah-Hartman, kernel, linux-kselftest, linux-kernel

On Fri, Jan 21, 2022 at 07:51:53PM +0500, Muhammad Usama Anjum wrote:
> 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>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-21 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21 14:51 [PATCH v2 1/2] selftests/lkdtm: Remove dead config option Muhammad Usama Anjum
2022-01-21 14:51 ` [PATCH v2 2/2] selftests/lkdtm: Add UBSAN config Muhammad Usama Anjum
2022-01-21 21:17   ` Kees Cook
2022-01-21 21:17 ` [PATCH v2 1/2] selftests/lkdtm: Remove dead config option Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.