From: sashiko-bot@kernel.org
To: "George Moussalem" <george.moussalem@outlook.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 3/6] firmware: qcom: scm: Add support for setting Bluetooth power modes
Date: Thu, 09 Jul 2026 09:27:20 +0000 [thread overview]
Message-ID: <20260709092720.973B21F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709-ipq5018-bluetooth-v5-3-e476c41f03b8@outlook.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The new `QCOM_SCM_PIL_PAS_BT_PWR_MODE` macro uses the exact same command ID (`0x21`) as the existing `QCOM_SCM_PIL_PAS_GET_RSCTABLE` macro within the `QCOM_SCM_SVC_PIL` service.
--
--- Patch [3]: [PATCH v5 3/6] firmware: qcom: scm: Add support for setting Bluetooth power modes ---
commit 7001f29bdf69c1e84287e5d8734b48feda414e41
Author: George Moussalem <george.moussalem@outlook.com>
firmware: qcom: scm: Add support for setting Bluetooth power modes
The Bluetooth subsystem (BTSS) on the IPQ5018 SoC supports setting power
modes which are configured through a Secure Channel Manager (SCM) call to
TrustZone. This commit adds a function to perform this call after checking
if the feature is supported by the QSEE image.
> diff --git a/drivers/firmware/qcom/qcom_scm.h b/drivers/firmware/qcom/qcom_scm.h
> index caab80a73e17f..5579df5a2aca7 100644
> --- a/drivers/firmware/qcom/qcom_scm.h
> +++ b/drivers/firmware/qcom/qcom_scm.h
> @@ -105,6 +105,7 @@ int qcom_scm_shm_bridge_enable(struct device *scm_dev);
> #define QCOM_SCM_PIL_PAS_SHUTDOWN 0x06
> #define QCOM_SCM_PIL_PAS_IS_SUPPORTED 0x07
> #define QCOM_SCM_PIL_PAS_MSS_RESET 0x0a
> +#define QCOM_SCM_PIL_PAS_BT_PWR_MODE 0x21
> #define QCOM_SCM_PIL_PAS_GET_RSCTABLE 0x21
[Severity: High]
Is it intended for QCOM_SCM_PIL_PAS_BT_PWR_MODE to use the exact same
command ID (0x21) as QCOM_SCM_PIL_PAS_GET_RSCTABLE?
Because both definitions share 0x21 within the QCOM_SCM_SVC_PIL service,
when __qcom_scm_is_call_available() queries the firmware for
QCOM_SCM_PIL_PAS_BT_PWR_MODE, it will falsely return true on any SoC that
already supports GET_RSCTABLE.
This would allow qcom_scm_pas_set_bluetooth_power_mode() to incorrectly
proceed and execute a 2-argument SCM call to TrustZone. Could this cause
the firmware to route the call to the GET_RSCTABLE handler (which expects
5 arguments, including physical addresses for DMA), potentially leading
to a Secure World memory fault?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709-ipq5018-bluetooth-v5-0-e476c41f03b8@outlook.com?part=3
next prev parent reply other threads:[~2026-07-09 9:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 9:18 [PATCH v5 0/6] Add support for IPQ5018 Bluetooth George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
2026-07-09 9:18 ` [PATCH v5 1/6] dt-bindings: net: bluetooth: Document Qualcomm IPQ5018 Bluetooth controller George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
2026-07-09 12:21 ` Add support for IPQ5018 Bluetooth bluez.test.bot
2026-07-09 9:18 ` [PATCH v5 2/6] Bluetooth: btqca: Add IPQ5018 support George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
2026-07-09 9:31 ` sashiko-bot
2026-07-09 9:35 ` George Moussalem
2026-07-09 9:18 ` [PATCH v5 3/6] firmware: qcom: scm: Add support for setting Bluetooth power modes George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
2026-07-09 9:27 ` sashiko-bot [this message]
2026-07-09 9:29 ` George Moussalem
2026-07-09 9:18 ` [PATCH v5 4/6] Bluetooth: Introduce Qualcomm IPQ5018 IPC based HCI driver George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
2026-07-09 9:30 ` sashiko-bot
2026-07-09 9:18 ` [PATCH v5 5/6] arm64: dts: qcom: ipq5018: add node required for Bluetooth support George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
2026-07-09 9:31 ` sashiko-bot
2026-07-09 18:16 ` Konrad Dybcio
2026-07-09 18:23 ` George Moussalem
2026-07-09 18:17 ` Konrad Dybcio
2026-07-09 18:25 ` George Moussalem
2026-07-09 18:40 ` Konrad Dybcio
2026-07-10 9:14 ` Bartosz Golaszewski
2026-07-10 9:23 ` Konrad Dybcio
2026-07-10 9:32 ` George Moussalem
2026-07-09 9:18 ` [PATCH v5 6/6] MAINTAINERS: Add IPQ5018 driver to Qualcomm Bluetooth driver entry George Moussalem
2026-07-09 9:18 ` George Moussalem via B4 Relay
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=20260709092720.973B21F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=george.moussalem@outlook.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.