All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Olof Johansson <olof@lixom.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Corrupted low memory in v3.9+
Date: Mon, 11 Nov 2013 15:31:23 -0800	[thread overview]
Message-ID: <528168CB.7070602@linux.intel.com> (raw)
In-Reply-To: <20131111113503.GA16090@gmail.com>

On 11/11/2013 03:35 AM, Ingo Molnar wrote:
> 
> If we reserve everything in low memory, all the time (which I very much 
> argue we should do) then the checker becomes a no-op and can be removed.
> 

Oops!  I had misunderstood how the checker worked -- I thought it
checked the *reserved* memory, but it in fact reserves memory
*independently* and then checks it.

The problem is fundamentally that setup_bios_corruption_check(); is
called too early in setup_arch() -- quite possibly due to other code
movement around it:

#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
	setup_bios_corruption_check();
#endif

	reserve_real_mode();

	trim_platform_memory_ranges();
	trim_low_memory_range();

	init_mem_mapping();


setup_bios_corruption_check() should presumably be called between
trim_low_memory_range() and init_mem_mapping().  I'm actually surprised
that we don't trip on this *all the time* since the realmode trampoline
falls in this area...

At the same time, we should change the default for
CONFIG_X86_RESERVE_LOW to 640, and perhaps move it under EXPERT.

What do you guys think?

	-hpa


  reply	other threads:[~2013-11-11 23:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 18:57 Corrupted low memory in v3.9+ Olof Johansson
2013-10-17 19:39 ` H. Peter Anvin
2013-10-17 20:39   ` Olof Johansson
2013-11-07 19:02     ` Olof Johansson
2013-11-07 19:31       ` H. Peter Anvin
2013-11-11 11:35         ` Ingo Molnar
2013-11-11 23:31           ` H. Peter Anvin [this message]
2013-11-12  0:04             ` H. Peter Anvin

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=528168CB.7070602@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=olof@lixom.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.