From: Albert Esteve <aesteve@redhat.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Albert Esteve <aesteve@redhat.com>,
Sarannya S <sarannya.s@oss.qualcomm.com>,
Pranav Mahesh Phansalkar <pranav.phansalkar@oss.qualcomm.com>,
Sudeepgoud Patil <sudeep.patil@oss.qualcomm.com>,
Tony Truong <tony.truong@oss.qualcomm.com>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: [PATCH v4 0/4] Add automotive SMEM hardening for Qualcomm platforms
Date: Thu, 22 Oct 2026 11:47:20 +0200 [thread overview]
Message-ID: <20261022-port-smem-v4-0-b0baf39c6e01@redhat.com> (raw)
The Qualcomm SMEM driver manages shared memory partitions used for
inter-processor communication on Qualcomm SoCs, including the
automotive SA8775P platform. Vendor trees carry additional validation
and partition-enumeration logic that is not yet present in master.
Patch 1 adds IN_PARTITION_RANGE() for pointer+size checks against a region.
Patch 2 adds bounds checks when walking private uncached and cached
entry lists.
Patch 3 validates item payload size and pointer once a matching entry is
found.
Patch 4 skips multi-remote-host partitions during enumeration. SMEM
now supports partitions involving more than one remote host, but the
driver does not implement that case yet.
The first three patches split the original vendor boundary-check change
so each class of condition can be reviewed on its own. All four are
based on public vendor patches from Qualcomm [1][2]. Adapted for
master. In particular:
- Dropped the xarray partition rework, which is already present in
master (79602b750b96c, "soc: qcom: smem: Switch partitions to
xarray")
Built on master (Linux 7.3-rc7), and tested on Qualcomm SA8775P Ride V3
board. SMEM platform device binds successfully, socinfo reads (soc_id,
revision) return valid values. No WARN or canary errors observed.
[1] https://git.codelinaro.org/clo/la/kernel/qcom/-/commit/3e521f2641c8f01f00fd74a088206942ce23d6d4
[2] https://git.codelinaro.org/clo/la/kernel/qcom/-/commit/842dd28b0276b3824a607e067b3c20e266bcf230
Signed-off-by: Albert Esteve <aesteve@redhat.com>
---
Changes in v4:
- Updated email addresses in SoB and authorship
- Updated IN_PARTITION_RANGE definition to use uintptr_t
- Changed while loop conditions to `<= end` to avoid
rejecting headers at the boundary
- Fixed post-loop sanity check to use cached_end instead of phdr
- Rebased to v7.3-rc7
- Link to v3: https://lore.kernel.org/r/20260924-port-smem-v3-0-fbc2ea81a654@redhat.com
Changes in v3:
- Rebased to v7.3-rc4
- Split the overflow/boundary patch into helper, list-walk, and payload
validation patches
- Fixed qcom_smem_get_private() while loop condition
- Fixed indentations
- Link to v2: https://lore.kernel.org/r/20260904-port-smem-v2-0-bb497dd3c48b@redhat.com
Changes in v2:
- Update patch 1 authorship to Sarannya
- Update all emails from @quicinc.com to @oss.qualcomm.com
- Make smem.c copyright yearless
- Link to v1: https://lore.kernel.org/r/20260820-port-smem-v1-0-d19a45f583bf@redhat.com
---
Sarannya S (3):
soc: qcom: smem: add IN_PARTITION_RANGE helper
soc: qcom: smem: validate private entry list walks
soc: qcom: smem: validate private item payloads
Tony Truong (1):
soc: qcom: smem: ignore multi remote host partitions
drivers/soc/qcom/smem.c | 110 ++++++++++++++++++++++++++++++++++--------------
1 file changed, 78 insertions(+), 32 deletions(-)
---
base-commit: 7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614
change-id: 20260819-port-smem-7518c77c9415
Best regards,
--
Albert Esteve <aesteve@redhat.com>
next reply other threads:[~2026-10-22 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 9:47 Albert Esteve [this message]
2026-10-22 9:47 ` [PATCH v4 1/4] soc: qcom: smem: add IN_PARTITION_RANGE helper Albert Esteve
2026-10-27 12:18 ` Konrad Dybcio
2026-10-22 9:47 ` [PATCH v4 2/4] soc: qcom: smem: validate private entry list walks Albert Esteve
2026-10-27 12:45 ` Konrad Dybcio
2026-10-28 8:29 ` Albert Esteve
2026-10-22 9:47 ` [PATCH v4 3/4] soc: qcom: smem: validate private item payloads Albert Esteve
2026-10-27 12:58 ` Konrad Dybcio
2026-10-22 9:47 ` [PATCH v4 4/4] soc: qcom: smem: ignore multi remote host partitions Albert Esteve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022-port-smem-v4-0-b0baf39c6e01@redhat.com \
--to=aesteve@redhat.com \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pranav.phansalkar@oss.qualcomm.com \
--cc=sarannya.s@oss.qualcomm.com \
--cc=sudeep.patil@oss.qualcomm.com \
--cc=tony.truong@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®