mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes
@ 2026-09-10 16:16 Vijendar Mukunda
  2026-09-10 16:16 ` [PATCH 1/4] ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers Vijendar Mukunda
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Vijendar Mukunda @ 2026-09-10 16:16 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, yung-chuan.liao,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
	Syed.SabaKareem, Mario.Limonciello, Richard.Gong, ckeepax,
	linux-sound, linux-kernel, Vijendar Mukunda

This series fixes four defects in the AMD ACP SoundWire machine drivers
(acp-sdw-legacy-mach.c and acp-sdw-sof-mach.c).

A bounds check is added to validate the SoundWire link ID before it is
used as an array index in create_sdw_dailink(), preventing out-of-bounds
access when an unexpected link_mask value is encountered. The codec
config count in the SOF machine driver is refactored to use a dedicated
variable rather than reusing the endpoint-count variable for two
purposes, making the intent clearer and avoiding a stale value being
passed to the codec config array. An operator-precedence bug in the
ffs(link_mask - 1) expression is corrected to ffs(link_mask) - 1,
ensuring the link ID is derived from the correct bit position. Finally,
the SOF machine driver card name is shortened to fit within the 16-byte
snd_card driver[] field and eliminate a compile-time warning.

Vijendar Mukunda (4):
  ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers
  ASoC: amd: acp: refactor codec config count in SOF SoundWire machine
    driver
  ASoC: amd: acp: fix ffs() operator precedence for SoundWire link ID
  ASoC: amd: acp: fix card name length warning in SOF SoundWire machine
    driver

 sound/soc/amd/acp/acp-sdw-legacy-mach.c | 14 ++++++++++++--
 sound/soc/amd/acp/acp-sdw-sof-mach.c    | 23 +++++++++++++++++------
 2 files changed, 29 insertions(+), 8 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-10 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 16:16 [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes Vijendar Mukunda
2026-09-10 16:16 ` [PATCH 1/4] ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers Vijendar Mukunda
2026-09-10 16:16 ` [PATCH 2/4] ASoC: amd: acp: refactor codec config count in SOF SoundWire machine driver Vijendar Mukunda
2026-09-10 16:16 ` [PATCH 3/4] ASoC: amd: acp: fix ffs() operator precedence for SoundWire link ID Vijendar Mukunda
2026-09-10 16:16 ` [PATCH 4/4] ASoC: amd: acp: fix card name length warning in SOF SoundWire machine driver Vijendar Mukunda
2026-09-10 16:27 ` [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®