Commit 3f29251
lib/prime_numbers: KUnit test should not select PRIME_NUMBERS
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.
Fixes: 313b38a ("lib/prime_numbers: convert self-test to KUnit")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Tamir Duberstein <[email protected]>
Link: https://lore.kernel.org/r/40f8a40eef4930d3ac9febd205bc171eb04e171c.1744641237.git.geert@linux-m68k.org
Signed-off-by: Kees Cook <[email protected]>1 parent 9b04461 commit 3f29251
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3290 | 3290 | | |
3291 | 3291 | | |
3292 | 3292 | | |
3293 | | - | |
| 3293 | + | |
3294 | 3294 | | |
3295 | 3295 | | |
3296 | 3296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
0 commit comments