lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 4 Jan 2011 17:05:33 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Yannick Heneault <yannick_heneault@...rox.com>
Cc:	linux kernel mailing list <linux-kernel@...r.kernel.org>,
	airlied@...hat.com, hpa@...or.com
Subject: Re: [BUG] VGA palette corruption in vgacon.c for EFI machine

On Fri, 26 Nov 2010 09:44:51 -0500
Yannick Heneault <yannick_heneault@...rox.com> wrote:

> Hi,
> 
> It seems there is a small problem of VGA palette corruption on EFI 
> machine. When the kernel initializes the architecture, it checks if the 
> machine is a EFI machine and if the memory at 0xa0000 is not tagged as 
> conventional memory, which should not be the case because this is VGA 
> memory. In that case, the kernel assumes that a VGA console can exist. I 
> would think that this assumption is correct.
> 
> When the kernel initialize the console in vgacon_startup it checks if it 
> can really use the VGA console. I think this is where a check is 
> missing. Currently, the function can fail if a VESA boot mode is 
> detected but not if a EFI boot mode was used. I think the code should be 
> modified like this :
> 
> --- a/drivers/video/console/vgacon.c
> +++ b/drivers/video/console/vgacon.c
> @@ -377,7 +377,8 @@ static const char *vgacon_startup(void)
>          u16 saved1, saved2;
>          volatile u16 *p;
> 
> -       if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB) {
> +       if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB ||
> +           screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) {
>                no_vga:
>   #ifdef CONFIG_DUMMY_CONSOLE
>                  conswitchp = &dummy_con;
> 
> 
> In that case, the VGA console will fail and a dummy console will be 
> temporary used until the EFI driver get loaded. At that point the 
> console will be mapped to the EFI driver and graphics (splash screen and 
> penguins) will appear correctly.
> 
> Currently, the function vgacon_startup doesn't fail and initialize the 
> video card for a real VGA mode. This function change the first 16 
> entries of the VGA palette. When the efifb driver kick-in, the palette 
> is not restored to default ramp value, thus the 16 first entry remain in 
> a modified state.
> 

If that fix worked for you then please send it as a formal, tested,
signed-off kernel patch and we'll put it in the pipeline and see what
emerges from the other end.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ