Skip to content

firmware: stratix10-svc: fix kaddr dangling pointers and populate kaddr1

Adrian Ng Ho Yin lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2firmware: stratix10-svc: fix dangling kaddr pointers in callback datadrivers/firmware/stratix10-svc.c include/linux/firmware/intel/stratix10-svc-client.h+45 -150 replies
2/2firmware: stratix10-svc: populate kaddr1 from config status responsedrivers/firmware/stratix10-svc.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] firmware: stratix10-svc: fix kaddr dangling pointers and populate kaddr1

kaddr1/2/3 in the stratix10 service layer are set to addresses of local arm_smccc_res fields that go out of scope when the setting function returns, leaving dangling pointers in the callback data.

Patch 1 fixes this by adding a1/a2/a3 scratch fields to struct stratix10_svc_cb_data, which lives for the SVC thread lifetime, and pointing kaddrN to those fields instead of the stack.

Patch 2 uses the same mechanism to populate the previously unset kaddr1 in svc_thread_cmd_config_status(), exposing firmware status details to callers.

Adrian Ng Ho Yin (2):
firmware: stratix10-svc: fix dangling kaddr pointers in callback data
firmware: stratix10-svc: populate kaddr1 from config status response

 drivers/firmware/stratix10-svc.c              | 45 ++++++++++++-------
 .../firmware/intel/stratix10-svc-client.h     | 17 +++++++
 2 files changed, 47 insertions(+), 15 deletions(-)
Signature · 1 line
2.49.GIT