[syslinux] [PATCH 1/1] linux.c32: Fix initrd alignment
Pierre-Alexandre Meyer
pierre at mouraf.org
Thu Mar 12 12:43:41 PDT 2009
Impact: None.
The end of memory needs to be page aligned: if the initrd expands beyond it,
Linux kernels won't be able to access the last few bytes.
Signed-off-by: Pierre-Alexandre Meyer <pierre at mouraf.org>
---
com32/lib/syslinux/load_linux.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index b772056..d09a2cb 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -292,7 +292,7 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
addr_t adj_start = (ml->start+align_mask) & ~align_mask;
if (ml->type == SMT_FREE &&
ml->next->start - adj_start >= irf_size)
- best_addr = (ml->next->start - irf_size) & ~align_mask;
+ best_addr = ((ml->next->start & ~align_mask) - irf_size) & ~align_mask;
}
if (!best_addr)
--
1.5.4.3
More information about the Syslinux
mailing list