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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Sep 2008 21:47:47 +0200
From:	Krzysztof Helt <krzysztof.h1@...zta.fm>
To:	spock@...too.org
Cc:	linux-kernel@...r.kernel.org,
	linux-fbdev-devel@...ts.sourceforge.net
Subject: Re: [PATCH] fbdev: don't allow to set a video mode via vga= if FB
 doesn't support it

On Sun, 21 Sep 2008 23:02:19 +0200
Michal Januszewski <spock@...too.org> wrote:

> From: Michal Januszewski <spock@...too.org>
> 
> Currently, it is possible to set a VESA graphics mode at boot time via
> the vga= parameter even when no framebuffer driver supporting this is
> configured.  This could lead to the system booting with a black screen,
> without a usable console.
> 

Right.

> ---
> diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
> index 401ad99..32a6045 100644
> --- a/arch/x86/boot/video-vesa.c
> +++ b/arch/x86/boot/video-vesa.c
> @@ -134,9 +131,13 @@ static int vesa_set_mode(struct mode_info *mode)
>  		/* It's a supported text mode */
>  		is_graphic = 0;
>  	} else if ((vminfo.mode_attr & 0x99) == 0x99) {
> +#if FB_SUPPORTS_BOOT_VESA
>  		/* It's a graphics mode with linear frame buffer */
>  		is_graphic = 1;
>  		vesa_mode |= 0x4000; /* Request linear frame buffer */
> +#else
> +		return -1;
> +#endif
>  	} else {
>  		return -1;	/* Invalid mode */
>  	}


This one could be simpler:

  		/* It's a supported text mode */
  		is_graphic = 0;
 +#if FB_SUPPORTS_BOOT_VESA
  	} else if ((vminfo.mode_attr & 0x99) == 0x99) {
  		/* It's a graphics mode with linear frame buffer */
  		is_graphic = 1;
  		vesa_mode |= 0x4000; /* Request linear frame buffer */
 +#endif
  	} else {
  		return -1;	/* Invalid mode */
  	}


Other than this, the patch is fine to me.

Acked-by: Krzysztof Helt <krzysztof.h1@...pl>

Regards,
Krzysztof

----------------------------------------------------------------------
Kredyt Hipoteczny w Banku Millennium - zdobywca Zlotego Lauru Klienta!
Sprawdz >> http://link.interia.pl/f1f15

--
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