From: sashiko-bot@kernel.org
To: "Petko Manolov" <petko.manolov@konsulko.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 3/3] arm: dts: altera: add Draeger M48 CPU Module
Date: Thu, 17 Sep 2026 16:43:01 +0000 [thread overview]
Message-ID: <20260917164302.5B1DA1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260917163157.1380860-4-petko.manolov@konsulko.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm: dts: out-of-bounds I/O access due to dw-apb-gpio size mismatch
--
commit 3b5d14b4fd8ed90306ed124677b8ae6312b78a2f
Author: Petko Manolov <petko.manolov@konsulko.com>
arm: dts: altera: add Draeger M48 CPU Module
This commit adds a new device tree for the Draeger M48 CPU Module. The module
is built around the Altera SoCFPGA Cyclone V.
> diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_draeger_m48.dts b/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_draeger_m48.dts
> new file mode 100644
> index 0000000000000..dae809c02adb8
> --- /dev/null
> +++ b/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_draeger_m48.dts
[ ... ]
> + soc {
> + gpio3: gpio@ff202000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "snps,dw-apb-gpio";
> + reg = <0xff202000 0x20>;
[Severity: High]
Does this compatible string cause an out-of-bounds I/O read regression during
probe?
The gpio3 node specifies a register window of 0x20 bytes. However, the
snps,dw-apb-gpio driver unconditionally accesses the GPIO_EXT_PORTA register
at offset 0x50 during initialization in dwapb_gpio_add_port() and during
system suspend in dwapb_gpio_suspend().
Accessing offset 0x50 from the 0xff202000 base address falls outside this
allocated 0x20 byte window. On an FPGA memory-mapped bus, accessing unmapped
or unpopulated physical memory can cause a synchronous external abort, leading
to a kernel panic at probe time.
Should this node use a different compatible string, such as altr,pio-1.0,
which fits the exactly 0x20 byte register window?
> +
> + portd: gpio-controller@0 {
> + compatible = "snps,dw-apb-gpio-port";
> + gpio-controller;
> + #gpio-cells = <2>;
> + snps,nr-gpios = <2>;
> + reg = <0>;
> + };
> + };
> +
> + gpio4: gpio@ff202020 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "snps,dw-apb-gpio";
> + reg = <0xff202020 0x20>;
[Severity: High]
Similarly, does this compatible string cause an out-of-bounds I/O access here?
Because gpio4 is placed immediately after gpio3 and also specifies a 0x20
byte window, the 0x50 offset accessed by the snps,dw-apb-gpio driver falls
outside the bounds of the gpio4 window as well.
> +
> + porte: gpio-controller@0 {
> + compatible = "snps,dw-apb-gpio-port";
> + gpio-controller;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917163157.1380860-1-petko.manolov@konsulko.com?part=3
next prev parent reply other threads:[~2026-09-17 16:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:31 [PATCH v6 0/3] arm: dts: altera: add Draeger M48 CPU Module Petko Manolov
2026-09-17 16:31 ` [PATCH v6 1/3] dt-bindings: vendor-prefixes: add Draeger AG Petko Manolov
2026-09-18 11:54 ` Krzysztof Kozlowski
2026-09-17 16:31 ` [PATCH v6 2/3] dt-bindings: arm: altera: add Draeger M48 Module Petko Manolov
2026-09-18 11:55 ` Krzysztof Kozlowski
2026-09-20 7:23 ` Petko Manolov
2026-09-21 7:42 ` Petko Manolov
2026-09-21 14:11 ` Krzysztof Kozlowski
2026-09-24 6:48 ` Petko Manolov
2026-09-17 16:31 ` [PATCH v6 3/3] arm: dts: altera: add Draeger M48 CPU Module Petko Manolov
2026-09-17 16:43 ` sashiko-bot [this message]
2026-09-18 11:57 ` Krzysztof Kozlowski
2026-09-20 7:59 ` Petko Manolov
2026-09-20 9:52 ` Krzysztof Kozlowski
2026-09-21 9:06 ` Petko Manolov
2026-09-21 14:16 ` Krzysztof Kozlowski
2026-09-24 6:48 ` Petko Manolov
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=20260917164302.5B1DA1F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=petko.manolov@konsulko.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