Message ID | 73c81ac85e21f1c5a75b7628d90cbb0e1b4ed0fa.1737833376.git.geert@linux-m68k.org |
---|---|
State | New |
Headers | show |
Series | firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP | expand |
On Sat, 25 Jan 2025 20:32:15 +0100, Geert Uytterhoeven wrote: > 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. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP commit: eb5c79828cfa72e8dbdf2db842a781ad6806cdaf All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/firmware/cirrus/Kconfig b/drivers/firmware/cirrus/Kconfig index ee09269c63b51173..0a883091259a2c11 100644 --- a/drivers/firmware/cirrus/Kconfig +++ b/drivers/firmware/cirrus/Kconfig @@ -6,15 +6,13 @@ config FW_CS_DSP config FW_CS_DSP_KUNIT_TEST_UTILS tristate - depends on KUNIT - select REGMAP + depends on KUNIT && REGMAP select FW_CS_DSP config FW_CS_DSP_KUNIT_TEST tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS - depends on KUNIT + depends on KUNIT && REGMAP default KUNIT_ALL_TESTS - select REGMAP select FW_CS_DSP select FW_CS_DSP_KUNIT_TEST_UTILS help
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: dd0b6b1f29b92202 ("firmware: cs_dsp: Add KUnit testing of bin file download") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- See also commits 70a640c0efa76674 ("regmap: REGMAP_KUNIT should not select REGMAP") and 47ee108a113c72e ("regmap: Provide user selectable option to enable regmap"). BTW, what's the point in having separate FW_CS_DSP_KUNIT_TEST and FW_CS_DSP_KUNIT_TEST_UTILS symbols? They are always enabled or disabled together. --- drivers/firmware/cirrus/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)