avoid Linux 2.2.x memory range check bug.

This commit is contained in:
okuji 2001-03-16 09:10:44 +00:00
parent c2e925be16
commit c610524eb0
4 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2001-03-16 OKUJI Yoshinori <okuji@gnu.org>
From Bodo Rueskamp <br@itchigo.com>:
* stage2/boot.c (load_initrd): Avoid the last 64kb for
Linux 2.2.x bug.
2001-03-03 OKUJI Yoshinori <okuji@gnu.org>
* docs/multiboot.texi (History): Written.

1
THANKS
View file

@ -10,6 +10,7 @@ Alessandro Rubini <rubini@gnu.org>
Alexander K. Hudek <alexhudek@home.com>
Andrew Clausen <clausen@gnu.org>
Bernhard Treutwein <Bernhard.Treutwein@Verwaltung.Uni-Muenchen.DE>
Bodo Rueskamp <br@itchigo.com>.
Bradford Hovinen <hovinen@redrose.net>
Brian Brunswick <brian@skarpsey.demon.co.uk>
Bryan Ford <baford@cs.utah.edu>

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
.TH GRUB "8" "February 2001" "grub (GNU GRUB 0.5.97)" FSF
.TH GRUB "8" "March 2001" "grub (GNU GRUB 0.5.97)" FSF
.SH NAME
grub \- the grub shell
.SH SYNOPSIS

View file

@ -632,8 +632,10 @@ load_initrd (char *initrd)
moveto = (LINUX_INITRD_MAX_ADDRESS - len) & 0xfffff000;
/* XXX: Linux 2.3.xx has a bug in the memory range check, so avoid
the last page. */
moveto -= 0x1000;
the last page.
XXX: Linux 2.2.xx has a bug in the memory range check, which is
worse than that of Linux 2.3.xx, so avoid the last 64kb. *sigh* */
moveto -= 0x10000;
memmove ((void *) RAW_ADDR (moveto), (void *) cur_addr, len);
printf (" [Linux-initrd @ 0x%x, 0x%x bytes]\n", moveto, len);