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-next>] [day] [month] [year] [list]
Message-Id: <1347877748-11766-1-git-send-email-matt@console-pimps.org>
Date:	Mon, 17 Sep 2012 11:29:08 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	linux-kernel@...r.kernel.org
Cc:	linux-efi@...r.kernel.org, Matt Fleming <matt.fleming@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>, Matthew Garrett <mjg@...hat.com>,
	Olof Johansson <olof@...om.net>,
	Peter Jones <pjones@...hat.com>, Ingo Molnar <mingo@...nel.org>
Subject: [PATCH] x86: Switch to vga console only if framebuffer details are missing

From: Matt Fleming <matt.fleming@...el.com>

The efi_enabled variable has come to mean "Do we have EFI runtime
services available?". However, lack of EFI runtime services does not
mean that we should switch to using the VGA console. Provided that the
boot loader passed the dimensions of the EFI framebuffer there is no
reason we can't use efifb.

There's also no reason to check the memory type of 0xa0000 - whether
or not that memory region is EFI_CONVENTIONAL_MEMORY is immaterial -
the EFI framebuffer device will still work, and checking the EFI
memory type of a memory region on a non-EFI machine is illogical.

Cc: H. Peter Anvin <hpa@...or.com>
Cc: Matthew Garrett <mjg@...hat.com>
Cc: Olof Johansson <olof@...om.net>
Cc: Peter Jones <pjones@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Matt Fleming <matt.fleming@...el.com>
---
 arch/x86/kernel/setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f4b9b80..29dc30a 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1021,7 +1021,7 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
-	if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
+	if (!screen_info.lfb_base || !screen_info.lfb_size)
 		conswitchp = &vga_con;
 #elif defined(CONFIG_DUMMY_CONSOLE)
 	conswitchp = &dummy_con;
-- 
1.7.4.4

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