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 <pjo...@redhat.com> > Signed-off-by: Laszlo Ersek <ler...@redhat.com> > Signed-off-by: Jan Setje-Eilers <jan.setjeeil...@oracle.com> > Signed-off-by: Mate Kukri <mate.ku...@canonical.com>
Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel