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:   Wed, 10 Nov 2021 13:46:12 +0300
From:   Baskov Evgeniy <baskov@...ras.ru>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     Baskov Evgeniy <baskov@...ras.ru>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Ingo Molnar <mingo@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
        linux-doc@...r.kernel.org, linux-efi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH RFC 4/5] efi: Add option for handling efi memory protection

Add option to enable handling strict page table permissions
added in previous patches.

Signed-off-by: Baskov Evgeniy <baskov@...ras.ru>
---
 drivers/firmware/efi/Kconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 2c3dac5ecb36..f57a9c865dce 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -243,6 +243,23 @@ config EFI_DISABLE_PCI_DMA
 	  options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma"
 	  may be used to override this option.
 
+config EFI_STRICT_PGTABLE
+	bool "Handle strict page table permissions in libstub"
+	depends on EFI_STUB && X86
+	default y
+	help
+	  Some firmware disables execution of memory allocated in boot loader
+	  and/or lower megabyte of physical address space, since it is allowed
+	  by specification. That prevents Linux kernel from booting.
+
+	  This option makes libstub either create temporary identity mapped
+	  page tables with unset non-executable flag  on x86_64 or just disable
+	  paging altogether on i386 to overcome the issue.
+
+	  If firmware does not restrict permissions on identity page tables,
+	  temporary page table creation may be disabled with kernel command
+	  line option "efi=notemppt".
+
 endmenu
 
 config EFI_EMBEDDED_FIRMWARE
-- 
2.33.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ