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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211110104613.23881-1-baskov@ispras.ru>
Date:   Wed, 10 Nov 2021 13:46:08 +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 0/5] Handle UEFI NX-restricted page tables

Note, that this patch series is RFC, since it is yet untested
and possibly incompatible with AMD SEV and related extensions.

The UEFI specification states that certain memory regions may
not have every permission, i.e. may not be writable or executable.

Furthermore there exist some implementations (at least on i386/x86_64)
that restrict execution of memory regions expected by the kernel to
be executable. E.g. first megabyte of address space, where trampoline
for switching between 4/5 level paging is placed and memory regions,
allocated as loader data.

This patch series allows Linux kernel to boot on such UEFI
implementations on i386 and x86_64.

The simplest way to achieve that on i386 is to disable paging
before jumping to potentially relocated code.

x86_64, on the other hand, does not allow disabling paging so it
is required to build temporary page tables containing memory regions
required for Linux kernel to boot with appropriate access permissions.

Baskov Evgeniy (5):
       Docs: document notemppt option
       efi: Add option for handling efi memory protection
       libstub: build temporary page table without NX-bit
       efi/x86_64: set page table if provided by libstub
       efi/x86: Disable paging when booting via efistub

 Documentation/admin-guide/kernel-parameters.txt |    7 
 arch/x86/boot/compressed/head_32.S              |   12 +
 arch/x86/boot/compressed/head_64.S              |   12 +
 drivers/firmware/efi/Kconfig                    |   17 ++
 drivers/firmware/efi/libstub/Makefile           |    2 
 drivers/firmware/efi/libstub/efi-stub-helper.c  |    3 
 drivers/firmware/efi/libstub/efistub.h          |   10 +
 drivers/firmware/efi/libstub/temp-pgtable.c     |  190 ++++++++++++++++++++++++
 drivers/firmware/efi/libstub/x86-stub.c         |    8 -
 9 files changed, 258 insertions(+), 3 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ