From: Ingo Molnar <mingo@elte.hu>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Alan Jenkins <alan-jenkins@tuffmail.co.uk>,
Hugh Dickens <hugh@veritas.com>, "H. Peter Anvin" <hpa@zytor.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] x86: check for and defend against BIOS memory corruption
Date: Fri, 29 Aug 2008 08:45:40 +0200 [thread overview]
Message-ID: <20080829064540.GA26619@elte.hu> (raw)
In-Reply-To: <b170af450808282320g27dfa2a9mc0e14e27e215ce96@mail.gmail.com>
* Rafał Miłecki <zajec5@gmail.com> wrote:
> 2008/8/28 Jeremy Fitzhardinge <jeremy@goop.org>:
> > Some BIOSes have been observed to corrupt memory in the low 64k. This
> > patch does two things:
> > - Reserves all memory which does not have to be in that area, to
> > prevent it from being used as general memory by the kernel. Things
> > like the SMP trampoline are still in the memory, however.
> > - Clears the reserved memory so we can observe changes to it.
> > - Adds a function check_for_bios_corruption() which checks and reports on
> > memory becoming unexpectedly non-zero. Currently it's called in the
> > x86 fault handler, and the powermanagement debug output.
> >
> > RFC: What other places should we check for corruption in?
> >
> > [ Alan, Rafał: could you check you see:
> > 1: corruption messages
> > 2: no crashes
> > Thanks -J
> > ]
>
> I was trying my best to crash system with this patch applied and failed :)
>
> Works great.
>
> Just wonder if I should expect any printk from
> check_for_bios_corruption? I do not see any:
>
> zajec@sony:~> dmesg | grep -i corr
> scanning 2 areas for BIOS corruption
that's _very_ weird.
maybe the BIOS expects _zeroes_ somewhere? Do you suddenly see crashes
if you change this line in Jeremy's patch:
+ memset(__va(addr), 0, size);
to something like:
+ memset(__va(addr), 0x55, size);
If this does not tickle any messages either, then maybe the problem is
in the identity of the entities we allocate in the first 64K. Is there a
list of allocations that go there when Jeremy's patch is not applied?
but ... i think with an earlier patch you saw corruption, right?
Far-fetched idea: maybe it's some CPU erratum during suspend/resume that
corrupts pagetables if the pagetables are allocated in the first 64K of
RAM? In that case we should use a bootmem allocation for pagetables that
give a minimum address of 64K.
Ingo
next prev parent reply other threads:[~2008-08-29 6:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 19:52 [PATCH RFC] x86: check for and defend against BIOS memory corruption Jeremy Fitzhardinge
2008-08-29 1:49 ` Yinghai Lu
2008-08-29 3:28 ` Jeremy Fitzhardinge
2008-08-29 9:25 ` Alan Cox
2008-08-29 10:13 ` Rafał Miłecki
2008-08-29 10:06 ` Alan Cox
2008-08-29 10:24 ` Hugh Dickins
2008-08-29 11:54 ` Rafał Miłecki
2008-08-29 12:09 ` Alan Jenkins
2008-08-29 13:21 ` Hugh Dickins
2008-08-29 16:30 ` Rafał Miłecki
2008-08-29 17:39 ` Rafał Miłecki
2008-09-04 19:42 ` Rafał Miłecki
2008-09-04 20:23 ` Hugh Dickins
2008-09-04 23:04 ` Jeremy Fitzhardinge
2008-09-06 18:09 ` Ingo Molnar
2008-08-29 14:08 ` Jeremy Fitzhardinge
2008-08-29 14:18 ` Jeremy Fitzhardinge
2008-08-29 20:31 ` Kasper Sandberg
2008-08-30 1:15 ` Jeremy Fitzhardinge
2008-08-29 6:20 ` Rafał Miłecki
2008-08-29 6:45 ` Ingo Molnar [this message]
2008-08-29 7:21 ` Jeremy Fitzhardinge
2008-08-29 7:30 ` Ingo Molnar
2008-08-29 8:02 ` Jeremy Fitzhardinge
2008-08-29 7:22 ` Jeremy Fitzhardinge
2008-08-29 8:14 ` Hugh Dickins
2008-08-29 14:48 ` Jeremy Fitzhardinge
2008-08-29 17:20 ` H. Peter Anvin
2008-09-08 11:35 ` Hugh Dickins
2008-09-08 17:16 ` Jeremy Fitzhardinge
2008-09-08 19:14 ` Hugh Dickins
2008-09-08 19:45 ` Jeremy Fitzhardinge
2008-08-29 17:02 ` H. Peter Anvin
2008-08-29 17:03 ` 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=20080829064540.GA26619@elte.hu \
--to=mingo@elte.hu \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=hpa@zytor.com \
--cc=hugh@veritas.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zajec5@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).