Searched hist:"15 e14f8ff549038cea7fb0b9ea2cd1602d0292c4" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/scripts/ |
| H A D | gen_ldelf_hex.py | 15e14f8ff549038cea7fb0b9ea2cd1602d0292c4 Sun Nov 09 12:37:05 UTC 2025 Aleksandr Iashchenko <aleksandr.iashchenko@linutronix.de> scripts/gen_ldelf_hex.py: account for true memsz in last load segment mapping
The pad_size array is used to compute code/data/load mapping sizes for ldelf by measuring the gaps after each PT_LOAD segment. The last entry was hardcoded to 0, effectively ignoring the final segment’s (p_memsz - p_filesz) - i.e. the BSS portion that exists in memory but not in the file.
As a result, the RW mapping for ldelf was undersized: the zero-filled area of the last PT_LOAD was not reserved, which could lead to writes past the mapped region.
Signed-off-by: Aleksandr Iashchenko <aleksandr.iashchenko@linutronix.de> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
|