Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] firmware: arm_scmi: Fix protocol parsing and validation
@ 2026-05-17 19:02 Sudeep Holla
  2026-05-17 19:02 ` [PATCH 1/4] firmware: arm_scmi: Read sensor config as 32-bit value Sudeep Holla
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sudeep Holla @ 2026-05-17 19:02 UTC (permalink / raw)
  To: Cristian Marussi, arm-scmi, linux-arm-kernel, Sudeep Holla

Hi,

This series fixes a few SCMI protocol parsing and validation issues found
while checking the driver message layouts against the SCMI specification.

The first patch fixes a clear response width mismatch in SENSOR_CONFIG_GET,
where the driver requested a 4-byte response but read it as a 64-bit value.

The next two patches harden notification parsing for variable-sized payloads.
BASE_ERROR_EVENT and SENSOR_UPDATE both carry counted trailing arrays, so the
received payload size must be validated before copying or parsing those
entries.

The final patch fixes Powercap protocol v2 helpers to validate the domain id
before accessing cached per-domain state.

No functional change is intended for well-formed SCMI responses.

Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc: arm-scmi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>

Regards,
Sudeep

---
Sudeep Holla (4):
      firmware: arm_scmi: Read sensor config as 32-bit value
      firmware: arm_scmi: Validate BASE_ERROR_EVENT payload size
      firmware: arm_scmi: Validate SENSOR_UPDATE payload size
      firmware: arm_scmi: Validate Powercap domains before state access

 drivers/firmware/arm_scmi/base.c     | 15 +++++++++++++--
 drivers/firmware/arm_scmi/powercap.c | 25 ++++++++++++++++++-------
 drivers/firmware/arm_scmi/sensors.c  | 12 ++++++++++--
 3 files changed, 41 insertions(+), 11 deletions(-)
---
base-commit: d0deb8265c8551343c5c155aaded6b56639e3820
change-id: 20260517-scmi_fixes-211563fc2ff2


-- 
Regards,
Sudeep



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

end of thread, other threads:[~2026-05-17 19:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 19:02 [PATCH 0/4] firmware: arm_scmi: Fix protocol parsing and validation Sudeep Holla
2026-05-17 19:02 ` [PATCH 1/4] firmware: arm_scmi: Read sensor config as 32-bit value Sudeep Holla
2026-05-17 19:02 ` [PATCH 2/4] firmware: arm_scmi: Validate BASE_ERROR_EVENT payload size Sudeep Holla
2026-05-17 19:02 ` [PATCH 3/4] firmware: arm_scmi: Validate SENSOR_UPDATE " Sudeep Holla
2026-05-17 19:02 ` [PATCH 4/4] firmware: arm_scmi: Validate Powercap domains before state access Sudeep Holla

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