From: sashiko-bot@kernel.org
To: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v4 04/11] arm64: dts: qcom: x1e80100-crd: Add pm8010 CRD pmic,id=m regulators
Date: Wed, 08 Jul 2026 00:53:38 +0000 [thread overview]
Message-ID: <20260708005339.11DAA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-x1e-camss-csi2-phy-dtsi-v4-4-572348ad1b2a@linaro.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The `pm8010_vreg_data` array in the RPMh regulator driver lacks a terminating empty `{}` sentinel.
--
--- Patch [4]: [PATCH v4 04/11] arm64: dts: qcom: x1e80100-crd: Add pm8010 CRD pmic,id=m regulators ---
commit 047315d3629a65ebc6a0299afcf53675ba20171b
Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
arm64: dts: qcom: x1e80100-crd: Add pm8010 CRD pmic,id=m regulators
This patch adds rpmh regulator definitions for the pm8010 CRD pmic. This
regulator set provides vreg_l3m_1p8, the regulator for the ov08x40 RGB
sensor on the CRD.
> diff --git a/arch/arm64/boot/dts/qcom/x1-crd.dtsi b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
> index a9c5c523575ee..7b9a40a7b9a95 100644
> --- a/arch/arm64/boot/dts/qcom/x1-crd.dtsi
> +++ b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
> @@ -897,6 +897,36 @@ vreg_l3j_0p8: ldo3 {
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
> };
> +
> + regulators-8 {
> + compatible = "qcom,pm8010-rpmh-regulators";
[Severity: High]
This isn't a bug introduced by this patch, but I noticed a potential problem
in the rpmh regulator driver when looking at the pm8010 regulators.
The pm8010_vreg_data array in drivers/regulator/qcom-rpmh-regulator.c lacks a
terminating empty {} sentinel:
drivers/regulator/qcom-rpmh-regulator.c:
static const struct rpmh_vreg_init_data pm8010_vreg_data[] = {
RPMH_VREG("ldo1", LDO, 1, &pmic5_nldo502, "vdd-l1-l2"),
RPMH_VREG("ldo2", LDO, 2, &pmic5_nldo502, "vdd-l1-l2"),
RPMH_VREG("ldo3", LDO, 3, &pmic5_pldo502ln, "vdd-l3-l4"),
RPMH_VREG("ldo4", LDO, 4, &pmic5_pldo502ln, "vdd-l3-l4"),
RPMH_VREG("ldo5", LDO, 5, &pmic5_pldo502, "vdd-l5"),
RPMH_VREG("ldo6", LDO, 6, &pmic5_pldo502ln, "vdd-l6"),
RPMH_VREG("ldo7", LDO, 7, &pmic5_pldo502, "vdd-l7"),
};
Because rpmh_regulator_init_vreg() iterates over this array using
rpmh_data->name as the loop condition, if a device tree specifies a regulator
name not present in this array, the loop will read past the end of the array.
Could this out-of-bounds read cause the PMIC to misconfigure a regulator if a
name happens to match adjacent memory, or lead to a kernel panic if it
reaches unmapped memory before encountering a NULL pointer?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-x1e-camss-csi2-phy-dtsi-v4-0-572348ad1b2a@linaro.org?part=4
next prev parent reply other threads:[~2026-07-08 0:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 0:44 [PATCH v4 00/11] arm64: dts: qcom: Add x1e/Hamoa camera DTSI Bryan O'Donoghue
2026-07-08 0:44 ` [PATCH v4 01/11] arm64: dts: qcom: x1e80100: Add CAMCC block definition Bryan O'Donoghue
2026-07-08 0:44 ` [PATCH v4 02/11] arm64: dts: qcom: x1e80100: Add CCI definitions Bryan O'Donoghue
2026-07-08 0:44 ` [PATCH v4 03/11] arm64: dts: qcom: x1e80100: Add CAMSS block definition Bryan O'Donoghue
2026-07-08 1:00 ` sashiko-bot
2026-07-08 0:44 ` [PATCH v4 04/11] arm64: dts: qcom: x1e80100-crd: Add pm8010 CRD pmic,id=m regulators Bryan O'Donoghue
2026-07-08 0:53 ` sashiko-bot [this message]
2026-07-08 0:44 ` [PATCH v4 05/11] arm64: dts: qcom: x1e80100-crd: Add ov08x40 RGB sensor on CSIPHY4 Bryan O'Donoghue
2026-07-08 1:04 ` sashiko-bot
2026-07-08 0:44 ` [PATCH v4 06/11] arm64: dts: qcom: x1e80100-t14s: Add pm8010 camera PMIC with voltage levels for IR and RGB camera Bryan O'Donoghue
2026-07-08 0:54 ` sashiko-bot
2026-07-08 0:44 ` [PATCH v4 07/11] arm64: dts: qcom: x1e80100-t14s: Add on ov02c10 RGB sensor on CSIPHY4 Bryan O'Donoghue
2026-07-08 0:44 ` [PATCH v4 08/11] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add pm8010 camera PMIC with voltage levels for IR and RGB camera Bryan O'Donoghue
2026-07-08 0:54 ` sashiko-bot
2026-07-08 0:44 ` [PATCH v4 09/11] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add l7b_2p8 voltage regulator for " Bryan O'Donoghue
2026-07-08 0:44 ` [PATCH v4 10/11] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add ov02c10 RGB sensor on CSIPHY4 Bryan O'Donoghue
2026-07-08 0:44 ` [PATCH v4 11/11] arm64: dts: qcom: x1e80100-dell-inspiron14-7441: Switch on CAMSS RGB sensor Bryan O'Donoghue
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=20260708005339.11DAA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox