grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 04/10] modules: load module sections at page-aligned addre


From: Daniel Kiper
Subject: Re: [PATCH v7 04/10] modules: load module sections at page-aligned addresses
Date: Tue, 8 Oct 2024 16:50:39 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Oct 04, 2024 at 03:41:26PM +0100, Mate Kukri wrote:
> Currently we load module sections at whatever alignment gcc+ld happened
> to dump into the ELF section header, which is often less then the page
> size. Since NX protections are page based, this alignment must be
> rounded up to page size on platforms supporting NX protections.
>
> This patch switches EFI platforms to load module sections at 4kB
> page-aligned addresses.
>
> It then changes the allocation size computation and the loader code in
> grub_dl_load_segments() to align the locations and sizes up to these
> boundaries, and fills any added padding with zeros.
>
> All of this happens before relocations are applied, so the relocations
> factor that in with no change.
>
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
> Signed-off-by: Mate Kukri <mate.kukri@canonical.com>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]