[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stage 1

From: Wolf Lammen
Subject: stage 1
Date: Mon, 15 Mar 2004 14:25:39 +0100 (MET)

Hi Okuji-san

If stage 1 was my software, I would at least correct the disk transfer
buffer setting in the floppy probing. The current code places this buffer
(register ES most probably set to 0xF000 by INT 0x13, function 8) at 
which is somewhere amidst the BIOS ROM area. So, if the floppy probing was
executed (it hardly ever is, as I have stated in earlier postings), a 512 byte
chunk of BIOS code is replaced with rubbish. Well, writing into ROM perhaps is
simply ignored, but think of Shadow RAM, where a write might succeed. The
effects of such overwriting might well be detected much later only, when the OS
is fired up, resulting in strange behaviour then, and a user wouldn’t
blame GRUB for this in the first place. I personally would not like to have
such a piece of code in my software, even if it was executed under rare
conditions only (fancy somebody [could be me]: " I'd like to have GRUB boot 
from my
fancy 1.68 MB formatted disk, but, hell, GRUB doesn’t support this
format. Let's see whether I can patch it. Aah..., there's a floppy probing code,
and there are the probing values. Easy. Simply include a value according to
my floppy geometry and bypass the program logic by placing an immediate jump
to the probing code at a proper location. Will work fine!" Indeed, will work
fine for GRUB, but some time later: BOOOM).

One might think about securing the chain stage 1/stage 2, because people are
still bitten by the loose connection (See a recent posting of Paul Galbraith
on this mailing list). Checking a magic value [a bit Monte Carlo, but with
high reliability] first before starting stage 2, could give an appropriate
hint to the user.

So far my suggestions for the current stage 1, apart from cleaning up. The
over-all program logic, as far as I can see, is, of course, sufficient enough
to work for 99.99% (or more) of all GRUB users using nowadays hardware.

Wolf Lammen

+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]