Re: [PATCH] 2.6.5-mm3, x86_64: probe_roms()

From: Andi Kleen
Date: Fri Apr 09 2004 - 12:03:41 EST


On Fri, 09 Apr 2004 18:21:57 +0200
Rene Herman <rene.herman@xxxxxxxxxxxx> wrote:

> Hi Andrew, Andi.
>
> Andi, this patch sent to Andrew since he has the i386 equivalent. If you
> want it yourself, or don't want it at all, please holler.
>
> x86_64 inherits arch/x86_64/kernel/setup.c:probe_roms() from i386 and
> shares its problems (minus the first) described at:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=107991009932451&w=2
>
> Like the i386 version, the attached x86_64 version also c99ifies the
> data and adds IORESOURCE_* type flags. It's been (cross-)compiled but
> not booted due to lack of hardware.

The C99ification is really ugly, because the tables end up more or less
unreadable unlike the previous version. I don't think it's a good
idea to use values from the ROM unchecked (like you did with the length
for the checksum). In fact this checksum change looks quite dangerous on i386
because there is very likely a machine out somewhere with bogus
length bytes which explodes when you do an access after the video ROM.
Chipsets sometimes have interesting errata in these areas.
[that's probably more an issue on i386 than on x86-64, but it's better
to be safe than sorry]

The other changes look ok. If you send me a patch just for these
I will apply it.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/