[Top][All Lists]

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

Re: [Patch] Fix VESA VBE BIOS support in GRUB Legacy

From: Gregg Levine
Subject: Re: [Patch] Fix VESA VBE BIOS support in GRUB Legacy
Date: Sat, 20 Nov 2010 18:29:06 -0500

On Sat, Nov 20, 2010 at 1:54 PM, Martin Decky <address@hidden> wrote:
> Hello folks,
> GRUB Legacy has two builtin commands "vbeprobe" and "testvbe" which are
> intended to test VESA VBE BIOS graphics modes (e.g. for manually testing the
> correct Linux VESA framebuffer mode before setting the vga= Linux kernel
> command line value).
> However, on many recent graphics cards which are VESA 3.0 compliant these
> commands do not work. The reason is a wrong definition of the vbe_mode
> structure in stage2/shared.h. The VBE mode info structure should be 256
> bytes long, but here it is actually only 255 bytes long, the array "unsigned
> char reserved3[189]" should be actually declared as "unsigned char
> reserved3[190]" (frankly, the same mistake is also present in the official
> VESA VBE 3.0 specification document).
> As the vbe_mode structure is allocated on stack in vbeprobe_func() and
> testvbe_func() (stage2/builtins.c), if the VESA BIOS actually stores all 256
> bytes in the 0x4f01 call (Get Mode Info), the last byte overruns the
> structure and ends in a different variable on the stack (mode_number in case
> of vbeprobe_func()), thus rendering both routines non-functional.
> Please see a trivial patch attached to this email which solves the issue.
> Thanks for committing it to the mainline of GRUB Legacy -- I understand that
> GRUB Legacy is no longer in development, but this is a stack overrun type of
> bug which should be fixed. I have not checked GRUB 2 whether it contains the
> same mistake, but somebody might have a look on it.
> Best regards
> Martin Decky
> --
>    ------------------------------------------------------------------
>    Mgr. Martin Decky
>     Department of Distributed and Dependable Systems,
>     Faculty of Mathematics and Physics,
>     Charles University in Prague,
>     Czech Republic
>   address@hidden                             address@hidden
>    http://d3s.mff.cuni.cz/~decky/                 http://www.decky.cz
>    ------------------------------------------------------------------

We aren't committing that patch against the source code. You are aware
that Grub-Legacy is just that. It is legacy because support, if it can
be called that, stopped when GRUB2 started to be developed. Now if you
want to add it to your tree and maintain it, it too would be
acceptable. But the final comment will come from the individual who
normally responds to these sort of statements.
Gregg C Levine address@hidden
"This signature fought the Time Wars, time and again."

reply via email to

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