[PATCH v4 22/26] arm64: mm: move ro_after_init section into the data segment

Kees Cook keescook at chromium.org
Thu Jun 16 09:18:13 PDT 2022


On Thu, Jun 16, 2022 at 01:31:23PM +0200, Ard Biesheuvel wrote:
> We used to have
> 
> text
> --
> rodata
> (ro_after_init)
> --
> inittext
> --
> initdata
> --
> data
> bss
> 
> where -- are the segment boundaries, which are always aligned to 64k on arm64
> 
> After this patch, we get
> 
> text
> --
> rodata
> --
> inittext
> --
> initdata
> --
> (ro_after_init)
> data
> bss
> 
> so in terms of padding due to alignment, there is not a lot of difference.

But how is ro_after_init read-only and data isn't, if there isn't a
segment alignment to make that work out?

-- 
Kees Cook



More information about the linux-arm-kernel mailing list