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]
Date:   Tue,  1 Jun 2021 10:53:51 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     x86@...nel.org
Cc:     "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...capital.net>,
        Andy Shevchenko <andy@...radead.org>,
        Ard Biesheuvel <ardb@...nel.org>, Baoquan He <bhe@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        Darren Hart <dvhart@...radead.org>,
        Dave Young <dyoung@...hat.com>,
        Hugh Dickins <hughd@...gle.com>,
        Ingo Molnar <mingo@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Lianbo Jiang <lijiang@...hat.com>,
        Mike Rapoport <rppt@...nel.org>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-doc@...r.kernel.org, linux-efi@...r.kernel.org,
        linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org
Subject: [PATCH 0/3] x86/setup: always resrve the first 1M of RAM

From: Mike Rapoport <rppt@...ux.ibm.com>

Hi,

Commit a799c2bd29d1 ("x86/setup: Consolidate early memory reservations")
changed the way early memory reservations are made and caused a regression
for users that set CONFIG_X86_RESERVE_LOW to 640K in their kernel
configuration [1] because there was no room for the real mode trampoline.

My initial suggestion was to reduce the limit of CONFIG_X86_RESERVE_LOW
from 640K to 512K [2], but in the end it seems simpler to always reserve
the first 1M of RAM after the real mode trampoline is allocated.

The first patch in the series contains the rework of early memory
reservations so that first 64K will be reserved very early before memblock
allocations  are possible and the remaining memory under 1M would be
reserved after the real mode trampoline is allocated. This patch also
update freeing of EFI boot services so that memory under 1M will remain
reserved which is also required for crash kernel [3].

The second and the third patches are cleanups that remove pieces that are
not longer required after the first patch is applied.

Randy, Hugh, I'd appreciate if you give this a whirl on your old Sandy
Bridge laptops as it changes again the way trim_snb_memory() works.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=213177
[2] https://lore.kernel.org/lkml/20210526081100.12239-1-rppt@kernel.org
[3] https://lore.kernel.org/lkml/20210531090023.16471-1-lijiang@redhat.com/#r

Mike Rapoport (3):
  x86/setup: always reserve the first 1M of RAM
  x86/setup: remove CONFIG_X86_RESERVE_LOW and reservelow options
  x86/crash: remove crash_reserve_low_1M()

 .../admin-guide/kernel-parameters.txt         |  5 --
 arch/x86/Kconfig                              | 29 ---------
 arch/x86/include/asm/crash.h                  |  6 --
 arch/x86/kernel/crash.c                       | 13 ----
 arch/x86/kernel/setup.c                       | 59 +++++++------------
 arch/x86/platform/efi/quirks.c                | 12 ++++
 arch/x86/realmode/init.c                      | 14 +++--
 7 files changed, 41 insertions(+), 97 deletions(-)


base-commit: c4681547bcce777daf576925a966ffa824edd09d
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ