From: Wandun Chen <chenwandun1@gmail.com>
To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: robh@kernel.org, saravanak@kernel.org
Subject: [PATCH 0/2] of: reserved_mem: fix stack overflow and make dynamic reserved region configurable
Date: Thu, 4 Jun 2026 15:36:09 +0800 [thread overview]
Message-ID: <20260604073611.3954433-1-chenwandun1@gmail.com> (raw)
From: Wandun Chen <chenwandun@lixiang.com>
Patch 1 fixes a stack buffer overflow in fdt_scan_reserved_mem() when the
DTS contains more than 64 reserved-memory regions.
Patch 2 makes the limit configurable via Kconfig
(OF_RESERVED_MEM_DYNAMIC_REGIONS) so platforms with many such regions
can modify it without patching the source.
Wandun Chen (2):
of: reserved_mem: avoid stack buffer overflow in
fdt_scan_reserved_mem()
of: reserved_mem: add config to extend dynamic reserved memory regions
drivers/of/Kconfig | 11 +++++++++++
drivers/of/of_private.h | 2 +-
drivers/of/of_reserved_mem.c | 6 ++++++
3 files changed, 18 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-06-04 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 7:36 Wandun Chen [this message]
2026-06-04 7:36 ` [PATCH 1/2] of: reserved_mem: avoid stack buffer overflow in fdt_scan_reserved_mem() Wandun Chen
2026-06-04 7:36 ` [PATCH 2/2] of: reserved_mem: add config to extend dynamic reserved memory regions Wandun Chen
2026-06-04 19:33 ` Rob Herring
2026-06-05 2:21 ` Wandun
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=20260604073611.3954433-1-chenwandun1@gmail.com \
--to=chenwandun1@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--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
all inboxes | Powered by JetHome®