[PATCH 0/2] of: reserved_mem: fix stack overflow and make dynamic reserved region configurable

Wandun Chen posted 2 patches 4 days, 1 hour ago
drivers/of/Kconfig           | 11 +++++++++++
drivers/of/of_private.h      |  2 +-
drivers/of/of_reserved_mem.c |  6 ++++++
3 files changed, 18 insertions(+), 1 deletion(-)
[PATCH 0/2] of: reserved_mem: fix stack overflow and make dynamic reserved region configurable
Posted by Wandun Chen 4 days, 1 hour ago
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