Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v4 8/8] arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses
Date: Wed, 10 Jun 2026 07:53:50 +0000	[thread overview]
Message-ID: <20260610075350.CCB741F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260609-block-as-nvmem-v4-8-45712e6b22c6@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding `compatible = "fixed-partitions"` to the `partitions-boot1` node causes the block layer OF partition parser to process the `nvmem-layout` child node as a partition. Since `nvmem-layout` lacks a `reg` property, `of_get_property(np, "reg", &len)` in `block/partitions/of.c` returns NULL and leaves the stack variable `len` uninitialized. This leads to either a boot-time kernel panic (if the uninitialized `len` happens to satisfy `len / sizeof(*reg) == a_cells + s_cells`, causing an unconditional NULL pointer dereference of `reg` in `of_read_number()`) or an `-EINVAL` error that aborts partition scanning for the entire `mmcblk0boot0` block device.
--

commit 1fb34b213f52de7d901295d011ead6f3136f8d92
Author: Loic Poulain <loic.poulain@oss.qualcomm.com>

arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses

This commit adds NVMEM cell definitions for WiFi and Bluetooth MAC addresses
to the eMMC boot1 partition on Arduino Uno-Q. It modifies the SDHC1 node to
declare a fixed-partitions block with an nvmem-layout.

> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> index bf088fa9807f0..128c7a7e76b5b 100644
> --- a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> @@ -409,7 +409,40 @@ &sdhc_1 {
[ ... ]
> +	card@0 {
> +		compatible = "mmc-card";
> +		reg = <0>;
> +
> +		partitions-boot1 {
> +			compatible = "fixed-partitions";
> +
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			nvmem-layout {

[Severity: High]
Does adding compatible = "fixed-partitions" here cause the block layer
OF partition parser to process the nvmem-layout child node as a partition?

Since nvmem-layout lacks a reg property, this appears to trigger an issue
in block/partitions/of.c where of_get_property(np, "reg", &len) returns
NULL and leaves the stack variable len uninitialized.

Depending on the uninitialized stack value, couldn't this cause either a
boot-time kernel panic due to a NULL pointer dereference in
of_read_number(), or an -EINVAL error that aborts partition scanning for
the entire mmcblk0boot0 block device?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260609-block-as-nvmem-v4-0-45712e6b22c6@oss.qualcomm.com?part=8

      reply	other threads:[~2026-06-10  7:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09  7:52 [PATCH v4 0/8] Support for block device NVMEM providers Loic Poulain
2026-06-09  7:52 ` [PATCH v4 1/8] dt-bindings: mmc: Document support for nvmem-layout Loic Poulain
2026-06-09  7:52 ` [PATCH v4 2/8] dt-bindings: net: wireless: qcom,ath10k: Document NVMEM cells Loic Poulain
2026-06-10  7:16   ` Krzysztof Kozlowski
2026-06-09  7:52 ` [PATCH v4 3/8] dt-bindings: bluetooth: qcom: Add NVMEM BD address cell Loic Poulain
2026-06-09  7:52 ` [PATCH v4 4/8] block: implement NVMEM provider Loic Poulain
2026-06-09  8:52   ` Bartosz Golaszewski
2026-06-09 10:13     ` Loic Poulain
2026-06-09 11:05       ` Bartosz Golaszewski
2026-06-10  7:53   ` sashiko-bot
2026-06-09  7:52 ` [PATCH v4 5/8] net: of_net: Add of_get_nvmem_eui48() helper for EUI-48 lookup Loic Poulain
2026-06-10  7:53   ` sashiko-bot
2026-06-09  7:52 ` [PATCH v4 6/8] Bluetooth: hci_sync: Add NVMEM-backed BD address retrieval Loic Poulain
2026-06-09  7:52 ` [PATCH v4 7/8] Bluetooth: qca: Set NVMEM BD address quirks when address is invalid Loic Poulain
2026-06-09  7:52 ` [PATCH v4 8/8] arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses Loic Poulain
2026-06-10  7:53   ` sashiko-bot [this message]

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=20260610075350.CCB741F00899@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox