All of lore.kernel.org
 help / color / mirror / Atom feed
* [alternative-merged] lib-prime_numbers_kunit_test-should-not-select-prime_numbers.patch removed from -mm tree
@ 2025-04-16  1:01 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-04-16  1:01 UTC (permalink / raw)
  To: mm-commits, tamird, rmoar, davidgow, brendan.higgins, geert, akpm


The quilt patch titled
     Subject: lib: PRIME_NUMBERS_KUNIT_TEST should not select PRIME_NUMBERS
has been removed from the -mm tree.  Its filename was
     lib-prime_numbers_kunit_test-should-not-select-prime_numbers.patch

This patch was dropped because an alternative patch was or shall be merged

------------------------------------------------------
From: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: lib: PRIME_NUMBERS_KUNIT_TEST should not select PRIME_NUMBERS
Date: Mon, 14 Apr 2025 16:35:00 +0200

Enabling a (modular) test should not silently enable additional kernel
functionality, as that may increase the attack vector of a product.

Fix this by making PRIME_NUMBERS_KUNIT_TEST depend on PRIME_NUMBERS
instead of selecting it.

After this, one can safely enable CONFIG_KUNIT_ALL_TESTS=m to build
modules for all appropriate tests for ones system, without pulling in
extra unwanted functionality, while still allowing a tester to manually
enable PRIME_NUMBERS and this test suite on a system where PRIME_NUMBERS
is not enabled by default.  Resurrect CONFIG_PRIME_NUMBERS=m in
tools/testing/selftests/lib/config for the latter use case.

Link: https://lkml.kernel.org/r/40f8a40eef4930d3ac9febd205bc171eb04e171c.1744641237.git.geert@linux-m68k.org
Fixes: 313b38a6ecb46db4 ("lib/prime_numbers: convert self-test to KUnit")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Tamir Duberstein <tamird@gmail.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <rmoar@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/Kconfig.debug                  |    2 +-
 tools/testing/selftests/lib/config |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/lib/Kconfig.debug~lib-prime_numbers_kunit_test-should-not-select-prime_numbers
+++ a/lib/Kconfig.debug
@@ -3290,7 +3290,7 @@ config GCD_KUNIT_TEST
 config PRIME_NUMBERS_KUNIT_TEST
 	tristate "Prime number generator test" if !KUNIT_ALL_TESTS
 	depends on KUNIT
-	select PRIME_NUMBERS
+	depends on PRIME_NUMBERS
 	default KUNIT_ALL_TESTS
 	help
 	  This option enables the KUnit test suite for the {is,next}_prime_number
--- a/tools/testing/selftests/lib/config~lib-prime_numbers_kunit_test-should-not-select-prime_numbers
+++ a/tools/testing/selftests/lib/config
@@ -1,2 +1,3 @@
 CONFIG_TEST_BITMAP=m
+CONFIG_PRIME_NUMBERS=m
 CONFIG_TEST_BITOPS=m
_

Patches currently in -mm which might be from geert@linux-m68k.org are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-16  1:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  1:01 [alternative-merged] lib-prime_numbers_kunit_test-should-not-select-prime_numbers.patch removed from -mm tree Andrew Morton

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.