On Tue, Jan 06, 2026 at 09:50:04AM +0100, Ahmad Fatoum wrote: > On 1/5/26 13:15, Ahmad Fatoum wrote: > > On 1/5/26 12:26 PM, Sascha Hauer wrote: > >> Add PBL-specific memory remapping function that always uses page-wise > >> mapping (ARCH_MAP_FLAG_PAGEWISE) for fine-grained permissions on > >> adjacent ELF segments with different protection requirements. > >> > >> Wraps arch-specific __arch_remap_range() for ARMv7 (4KB pages) and > >> ARMv8 (page tables with BBM). Needed for ELF segment permission setup. > >> > >> Signed-off-by: Sascha Hauer <[email protected]> > > > > Reviewed-by: Ahmad Fatoum <[email protected]> > > > Hmm, a question: Why do we need to preemptively break up pages? > Doesn't normal remapping do that already? My understanding was > that we only did it here to allow remapping while executing from > it, but in the PBL ELF loader we are not executing from there, > so there should not be an issue.
Yes, I think the ARCH_MAP_FLAG_PAGEWISE flag can be dropped here. In the end it seems we do not the flag anymore when loading the ELF image in PBL. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
