mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thorsten Blum <blum@kernel.org>
To: Luiz Capitulino <luizcap@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	x86@kernel.org, Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	corbet@lwn.net, hpa@zytor.com,
	"David Hildenbrand (Red Hat)" <david@kernel.org>,
	Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH v2] x86: remove the BIOS memory corruption check feature
Date: Fri, 9 Oct 2026 20:06:49 +0200	[thread overview]
Message-ID: <asktOXVRiXNOTcqH@kernel.org> (raw)
In-Reply-To: <9e1a161e-9246-41d1-9651-ffa85b1bc99b@redhat.com>

On Mon, Jul 20, 2026 at 04:41:05PM -0400, Luiz Capitulino wrote:
> By default, the BIOS memory corruption check works by reserving the
> first 64 KiB physical area from memblock, zeroing it and then scanning it
> periodically.
> 
> However, this functionality has been broken since v5.13 by two commits:
> 
> - Commit a799c2bd29d1 ("x86/setup: Consolidate early memory reservations").
>   Moved trim_low_memory_range() into early_reserve_memory(), which runs
>   earlier in setup_arch(), causing the first 64 KiB to be reserved (when
>   CONFIG_X86_RESERVE_LOW=64) before setup_bios_corruption_check() runs
> 
> - Commit f1d4d47c5851 ("x86/setup: Always reserve the first 1M of RAM").
>   Hardcodes the reservation of the first 64 KiB early in
>   early_reserve_memory()
> 
> It might be possible to get this feature to work by allowing
> setup_bios_corruption_check() to run first, but it's just not worth it
> given that the kernel will never access this memory area anyways.
> 
> Signed-off-by: Luiz Capitulino <luizcap@redhat.com>
> ---
> 
> Changelog
> =========
> 
> v2
> - Rebase against latest Linus tree (v7.2-rc4)
> - Improve changelog
> 
>  .../admin-guide/kernel-parameters.txt         |  23 ---
>  arch/x86/Kconfig                              |  30 ---
>  arch/x86/configs/i386_defconfig               |   1 -
>  arch/x86/configs/x86_64_defconfig             |   1 -
>  arch/x86/include/asm/bios_ebda.h              |  17 --
>  arch/x86/include/asm/setup.h                  |   1 -
>  arch/x86/kernel/Makefile                      |   2 -
>  arch/x86/kernel/check.c                       | 187 ------------------
>  arch/x86/kernel/setup.c                       |   4 -
>  9 files changed, 266 deletions(-)
>  delete mode 100644 arch/x86/kernel/check.c

Hi Luiz,

v2 no longer applies to mainline - are you planning to rebase it for v3?

Regarding the changelog: did you consider that the check is only broken
for the default size? Booting with

  memory_corruption_check=1 memory_corruption_check_size=256K

still works and I get:

  check: Scanning 1 areas for low memory corruption
  check: Scanning for low memory corruption every 60 seconds

Thanks,
Thorsten

  parent reply	other threads:[~2026-10-09 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 20:41 Luiz Capitulino
2026-07-20 20:54 ` H. Peter Anvin
2026-10-09 18:06 ` Thorsten Blum [this message]
2026-10-09 20:16   ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=asktOXVRiXNOTcqH@kernel.org \
    --to=blum@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luizcap@redhat.com \
    --cc=mingo@redhat.com \
    --cc=rppt@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®