Message ID | 20211116152137.52129-1-daniel.baluta@oss.nxp.com (mailing list archive) |
---|---|
Headers | show |
Series | New debug feature: IPC message injector | expand |
On Tue, 16 Nov 2021 17:21:33 +0200, Daniel Baluta wrote: > From: Daniel Baluta <daniel.baluta@nxp.com> > > With the new SND_SOC_SOF_DEBUG_IPC_MSG_INJECTOR it is going to be > possible to inject arbitrary messages via the debugfs/sof/ipc_msg_inject > file and get the reply from the same file as a binary. > > The main use of this feature is to stress test the firmware's robustness > against maliciously (or erroneous) crafted messages. > We also receive firmware crash reports with only a binary of the sent > message which caused the firmware crash. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/4] ASoC: SOF: utils: Add generic function to get the reply for a tx message commit: 8ae77801c81d16a09f6b67a6f8d91255d34f5f2c [2/4] ASoC: SOF: imx: Use the generic helper to get the reply commit: 18c45f270352fb76c8b5b133b3ae3971769f8a22 [3/4] ASoC: SOF: intel: Use the generic helper to get the reply commit: 0bd2891bda4550774946abbfac88443a16c15d5a [4/4] ASoC: SOF: debug: Add support for IPC message injection commit: 2f0b1b013bbc5d6f4c7c386e12f423d6b4ef3245 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
From: Daniel Baluta <daniel.baluta@nxp.com> With the new SND_SOC_SOF_DEBUG_IPC_MSG_INJECTOR it is going to be possible to inject arbitrary messages via the debugfs/sof/ipc_msg_inject file and get the reply from the same file as a binary. The main use of this feature is to stress test the firmware's robustness against maliciously (or erroneous) crafted messages. We also receive firmware crash reports with only a binary of the sent message which caused the firmware crash. Before adding the new debug feature we needed to make sure that the IPC reply handling is working correctly for cases when we don't know beforehand the size of the reply (since we don't know what kind of message we are sending). Peter Ujfalusi (4): ASoC: SOF: utils: Add generic function to get the reply for a tx message ASoC: SOF: imx: Use the generic helper to get the reply ASoC: SOF: intel: Use the generic helper to get the reply ASoC: SOF: debug: Add support for IPC message injection sound/soc/sof/Kconfig | 8 +++ sound/soc/sof/debug.c | 107 ++++++++++++++++++++++++++++++++++ sound/soc/sof/imx/imx8.c | 37 +----------- sound/soc/sof/imx/imx8m.c | 37 +----------- sound/soc/sof/intel/atom.c | 43 +------------- sound/soc/sof/intel/bdw.c | 43 +------------- sound/soc/sof/intel/hda-ipc.c | 29 +-------- sound/soc/sof/ipc.c | 61 +++++++++++++++++++ sound/soc/sof/sof-priv.h | 10 ++++ 9 files changed, 192 insertions(+), 183 deletions(-)