DragonFly commits List (threaded) for 2009-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
DragonFly-2.3.0.48.g76adb master sys/boot/pc32/boot2 boot1.S
commit 76adb3c3574e7451137604b62e41fc0ed48b021b
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date: Wed Feb 11 01:53:52 2009 -0800
Fix long-standing bug in boot1 code - can read junk from fake partition table
boot1 reads the MBR to locate the BSD partition type (0xA5). However, to
reduce the size of the boot1 code the 32 bit LBA for the MBR was being
loaded via the fake partition table at label 'part4', which was assumed to
contain a LBA of 0. Unfortunately this portion of the boot1 code is not
usually written by the disklabel program and may contain garbage.
For the last few years we have worked around the issue by zeroing out
the label area before installing a new label. We still have to do this
to avoid disklabel32/disklabel64 confusion, but with this fix forgetting
to zero the area should not cause a properly installed disklabel to fail
to boot properly.
To fix the problem, add the necessary instructions to generate a 32 bit
LBA of 0 directly for reading the MBR. They barely fit.
Summary of changes:
sys/boot/pc32/boot2/boot1.S | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/76adb3c3574e7451137604b62e41fc0ed48b021b
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]