]> git.ipfire.org Git - thirdparty/grub.git/commit
loader/i386/bsdXX: Fix loading after unaligned module
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 10 Jul 2023 15:17:35 +0000 (17:17 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 12 Dec 2023 16:14:27 +0000 (17:14 +0100)
commitc129e44e7f9af9f0a753c5490f6cc36c25aa6579
treea87063d713a3cd1c69d7621945864746770c2f9f
parent89fbe0cac97b5827941a82c55158523e5d622b42
loader/i386/bsdXX: Fix loading after unaligned module

Current code implicitly assumes that aligning chunk_size + *kern_end is
the same as aligning on curload which is not the case because
chunk_size starts at zero even if *kern_end is unaligned and ALIGN_PAGE
moved curload to an aligned position but not *kern_end + chunk_size.

This fixes booting of FreeBSD with zfs module.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/i386/bsdXX.c