Hello community, here is the log from the commit of package grub for openSUSE:Factory checked in at 2011-12-25 17:34:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub (Old) and /work/SRC/openSUSE:Factory/.grub.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub", Maintainer is "d...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/grub/grub.changes 2011-12-01 12:24:09.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.grub.new/grub.changes 2011-12-25 17:34:27.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Dec 20 10:46:59 UTC 2011 - d...@suse.com + +- Fix access to incomplete last track. + +------------------------------------------------------------------- New: ---- handle-incomplete-last-track ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub.spec ++++++ --- /var/tmp/diff_new_pack.AwXetC/_old 2011-12-25 17:34:28.000000000 +0100 +++ /var/tmp/diff_new_pack.AwXetC/_new 2011-12-25 17:34:28.000000000 +0100 @@ -69,6 +69,7 @@ Patch40: grub-iso-fixes Patch41: stage2-gfx-cmdline-len-fix.diff Patch42: nulterminate-configfile +Patch43: handle-incomplete-last-track Url: http://www.gnu.org/software/grub/grub.en.html BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Grand Unified Boot Loader @@ -128,6 +129,7 @@ %patch40 -p1 %patch41 -p1 %patch42 -p1 +%patch43 -p1 %build perl -pi -e 's,/usr/share/grub/i386-pc,/usr/lib/grub,' docs/grub.texi ++++++ handle-incomplete-last-track ++++++ From: Alexander Graf <ag...@suse.de> Subject: [PATCH] Fix grub access to incomplete tracks Date: Wed, 14 Dec 2011 18:23:00 +0100 When we have a disk in our system that has an LBA count that exceeds the track boundary limits, grub still tries to read all of the track into its buffer. This fails for obvious reasons, but can be easily circumvented: Just cap the amount of sectors we want to read to a sensible amount. That way we don't read beyond the end of the disk and the buffer is filled with sensible data up to the point where the higher layers should care about the data. Signed-off-by: Alexander Graf <ag...@suse.de> Signed-off-by: Balazs Kutil <bku...@suse.cz> Acked-by: Torsten Duwe <d...@suse.de> diff --git a/stage2/bios.c b/stage2/bios.c index 2d85e40..e3ad774 100644 --- a/stage2/bios.c +++ b/stage2/bios.c @@ -66,5 +66,11 @@ biosdisk (int read, int drive, struct geometry *geometry, #endif /* NO_BUGGY_BIOS_IN_THE_WORLD */ + /* For incomplete last tracks, just read as much as we can */ + if ((sector < geometry->total_sectors) && + (sector + nsec) > geometry->total_sectors) { + nsec = geometry->total_sectors - sector; + } + /* FIXME: sizeof (DAP) must be 0x10. Should assert that the compiler can't add any padding. */ dap.length = sizeof (dap); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org