diff options
| author | Sang-Heon Jeon <ekffu200098@gmail.com> | 2026-06-14 22:38:06 +0900 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2026-07-20 15:52:39 -0500 |
| commit | db3dbdfea1b8f38774419c5c2c14e4b81c48708d (patch) | |
| tree | 4f6ef2535e55f9ae34cf23365296cbcbfc69a528 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
of: reserved_mem: prevent OOB when too many dynamic regions are defined
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>
Link: https://patch.msgid.link/20260614133807.2165124-2-ekffu200098@gmail.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
