Skip to content

Commit eb5c798

Browse files
geertubroonie
authored andcommitted
firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP
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 FW_CS_DSP_KUNIT_TEST (and FW_CS_DSP_KUNIT_TEST_UTILS) depend on REGMAP 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 REGMAP_BUILD and this test suite on a system where REGMAP is not enabled by default. Fixes: dd0b6b1 ("firmware: cs_dsp: Add KUnit testing of bin file download") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://patch.msgid.link/73c81ac85e21f1c5a75b7628d90cbb0e1b4ed0fa.1737833376.git.geert@linux-m68k.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2e3c688 commit eb5c798

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/firmware/cirrus/Kconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ config FW_CS_DSP
66

77
config FW_CS_DSP_KUNIT_TEST_UTILS
88
tristate
9-
depends on KUNIT
10-
select REGMAP
9+
depends on KUNIT && REGMAP
1110
select FW_CS_DSP
1211

1312
config FW_CS_DSP_KUNIT_TEST
1413
tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS
15-
depends on KUNIT
14+
depends on KUNIT && REGMAP
1615
default KUNIT_ALL_TESTS
17-
select REGMAP
1816
select FW_CS_DSP
1917
select FW_CS_DSP_KUNIT_TEST_UTILS
2018
help

0 commit comments

Comments
 (0)