Devicetree
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Sang-Heon Jeon <ekffu200098@gmail.com>
Cc: devicetree@vger.kernel.org, saravanak@kernel.org
Subject: Re: [PATCH v2 1/2] of: reserved_mem: prevent OOB when too many dynamic regions are defined
Date: Mon, 20 Jul 2026 15:34:47 -0500	[thread overview]
Message-ID: <178457968569.4019756.11307139397257471085.robh@kernel.org> (raw)
In-Reply-To: <20260614133807.2165124-2-ekffu200098@gmail.com>


On Sun, 14 Jun 2026 22:38:06 +0900, Sang-Heon Jeon wrote:
> On boot, fdt_scan_reserved_mem() saves each dynamically-placed
> /reserved-memory subnode into a local array of size
> MAX_RESERVED_REGIONS.
> 
> If the device tree defines more than MAX_RESERVED_REGIONS
> dynamically-placed regions, fdt_scan_reserved_mem() writes past the
> end of the local array.
> 
> Add a bounds check that logs an error and skips the excess regions,
> restoring the original behavior.
> 
> Fixes: 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved memory regions are processed")
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
>  drivers/of/of_reserved_mem.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 

Applied, thanks!


  parent reply	other threads:[~2026-07-20 20:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14 13:38 [PATCH v2 0/2] of: reserved_mem: fix OOB write and name skipped nodes Sang-Heon Jeon
2026-06-14 13:38 ` [PATCH v2 1/2] of: reserved_mem: prevent OOB when too many dynamic regions are defined Sang-Heon Jeon
2026-06-14 13:47   ` sashiko-bot
2026-07-20 20:34   ` Rob Herring (Arm) [this message]
2026-06-14 13:38 ` [PATCH v2 2/2] of: reserved_mem: print skipped node name when too many " Sang-Heon Jeon
2026-06-14 13:50   ` sashiko-bot
2026-06-14 14:46     ` Sang-Heon Jeon
2026-07-20 20:35   ` Rob Herring (Arm)

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=178457968569.4019756.11307139397257471085.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ekffu200098@gmail.com \
    --cc=saravanak@kernel.org \
    /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