linux/drivers/firmware
Richard Fitzgerald 285b2c74cf
firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version
Call cs_dsp_mock_xm_header_get_fw_version() to get the firmware version
from the dummy XM header data in cs_dsp_bin_err_test_common_init().

Make the same change to cs_dsp_bin_test_common_init() and remove the
cs_dsp_mock_xm_header_get_fw_version_from_regmap() function.

The code in cs_dsp_test_bin.c was correctly calling
cs_dsp_mock_xm_header_get_fw_version_from_regmap() to fetch the fw version
from a dummy header it wrote to XM registers. However in
cs_dsp_test_bin_error.c the test doesn't stuff a dummy header into XM, it
populates it the normal way using a wmfw file. It should have called
cs_dsp_mock_xm_header_get_fw_version() to get the data from its blob
buffer, but was calling cs_dsp_mock_xm_header_get_fw_version_from_regmap().
As nothing had been written to the registers this returned the value of
uninitialized data.

The only other use of cs_dsp_mock_xm_header_get_fw_version_from_regmap()
was cs_dsp_test_bin.c, but it doesn't need to use it. It already has a
blob buffer containing the dummy XM header so it can use
cs_dsp_mock_xm_header_get_fw_version() to read from that.

Fixes: cd8c058499 ("firmware: cs_dsp: Add KUnit testing of bin error cases")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250410132129.1312541-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-10 14:47:14 +01:00
..
arm_ffa firmware: arm_ffa: Set dma_mask for ffa devices 2025-02-28 11:20:06 +00:00
arm_scmi soc: driver updates for 6.15, part 1 2025-03-27 09:05:55 -07:00
broadcom
cirrus firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version 2025-04-10 14:47:14 +01:00
efi cxl for v6.15 2025-04-02 20:04:43 -07:00
google firmware: google: vpd: Use const 'struct bin_attribute' callback 2024-12-17 03:59:31 +00:00
imx i.MX fixes for 6.14: 2025-03-06 16:32:48 +01:00
meson firmware: meson_sm: add missing MODULE_DESCRIPTION() macro 2024-06-24 10:08:53 +02:00
microchip firmware: microchip: fix UL_IAP lock check in mpfs_auto_update_state() 2024-12-05 15:08:51 +00:00
psci treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
qcom firmware: qcom: uefisecapp: fix efivars registration race 2025-02-08 11:38:03 -06:00
samsung firmware: Exynos ACPM: Fix spelling mistake "Faile" -> "Failed" 2025-02-17 10:17:21 +01:00
smccc soc: driver updates for 6.15, part 1 2025-03-27 09:05:55 -07:00
tegra Revert "firmware: tegra: bpmp: Use scoped device node handling to simplify error paths" 2024-10-24 18:38:07 +02:00
xilinx firmware: xilinx: Dont send linux address to get fpga config get status 2025-02-17 15:40:01 +01:00
arm_scpi.c Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
arm_sdei.c firmware: arm_sdei: Fix the input parameter of cpuhp_remove_state() 2024-10-23 16:19:03 +01:00
dmi_scan.c firmware: dmi: Mark bin_attributes as __ro_after_init 2025-02-21 09:20:30 +01:00
dmi-id.c firmware: dmi-id: add a release callback function 2024-04-08 09:34:24 +02:00
dmi-sysfs.c firmware: dmi: Constify 'struct bin_attribute' 2025-02-21 09:20:30 +01:00
edd.c
iscsi_ibft_find.c
iscsi_ibft.c iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() 2025-01-29 14:58:31 -05:00
Kconfig soc: driver updates for 6.15, part 1 2025-03-27 09:05:55 -07:00
Makefile soc: driver updates for 6.15, part 1 2025-03-27 09:05:55 -07:00
memmap.c firmware: memmap: Constify memmap_ktype 2024-10-13 17:22:33 +02:00
mtk-adsp-ipc.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
qemu_fw_cfg.c firmware: qemu_fw_cfg: constify 'struct bin_attribute' 2025-02-21 09:20:32 +01:00
raspberrypi.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
stratix10-rsu.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
stratix10-svc.c firmware: stratix10-svc: Use kthread_run_on_cpu() 2024-12-16 18:30:11 -06:00
sysfb_simplefb.c firmware/sysfb: Set firmware-framebuffer parent device 2024-02-14 10:09:17 +01:00
sysfb.c chrome platform firmware changes for 6.13 2024-11-19 10:25:47 -08:00
thead,th1520-aon.c firmware: thead,th1520-aon: Fix use after free in th1520_aon_init() 2025-03-18 13:09:00 +01:00
ti_sci.c firmware: ti_sci: Remove use of of_match_ptr() helper 2024-10-25 12:56:37 -05:00
ti_sci.h firmware: ti_sci: Introduce Power Management Ops 2024-10-25 10:45:07 -05:00
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: Document the driver private data structure 2024-11-12 16:03:34 +01:00