From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Hugh Dickins <hugh@veritas.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Yinghai Lu <yhlu.kernel@gmail.com>, Ingo Molnar <mingo@elte.hu>,
"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 13:09:18 +0100 [thread overview]
Message-ID: <48B7E6EE.9090901@tuffmail.co.uk> (raw)
In-Reply-To: <b170af450808290454m2f349ce3w4f400b0df0e105a2@mail.gmail.com>
Rafał Miłecki wrote:
> 2008/8/29 Hugh Dickins <hugh@veritas.com>:
>
>>> On Fri, 29 Aug 2008, Rafał Miłecki wrote:
>>>
>>> Out of current discussion I tried using s2ram on patched kernel (I did
>>> not try s2ram earlier, my problem was (un)plugging HDMI - some ACPI
>>> code probably).
>>>
>>> Corruption output is quite huge, I attached it to bug report:
>>> http://bugzilla.kernel.org/show_bug.cgi?id=11237
>>> http://bugzilla.kernel.org/attachment.cgi?id=17526
>>>
>> Not quite the output we were expecting! I've not got around to trying
>> it yet, so beware, but I think Jeremy's patch needs the following on top.
>> Or you may prefer to wait until one of us reports that it is now working
>> as intended.
>>
>> --- a/arch/x86/kernel/setup.c 2008-08-29 11:17:16.000000000 +0100
>> +++ b/arch/x86/kernel/setup.c 2008-08-29 11:19:24.000000000 +0100
>> @@ -636,11 +636,12 @@ void check_for_bios_corruption(void)
>> unsigned long *addr = __va(scan_areas[i].addr);
>> unsigned long size = scan_areas[i].size;
>>
>> - for(; size; addr++, size--) {
>> + for(; size; addr++, size -= sizeof(unsigned long)) {
>> if (!*addr)
>> continue;
>> printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
>> addr, __pa(addr), *addr);
>> + *addr = 0;
>> corruption = 1;
>> }
>> }
>>
>
> I tried your patch anyway (after applying Jeremy's patch of course)
> and it doesn't seem to work. The only output is:
> scanning 2 areas for BIOS corruption
> after using s2ram. I do not get any
> Corrupted low memory at*
>
It seemed to work for me. Did you remember to plug HDMI to trigger the
corruption before you used s2ram?
[ 71.663828] Back to C!
[ 71.663828] Corrupted low memory at ffff8800000083e8 (83e8 phys) =
803c85370cfc0000
[ 71.663828] Corrupted low memory at ffff8800000083f0 (83f0 phys) =
00003000
[ 71.663828] Pid: 7335, comm: pm-suspend Not tainted
2.6.27-rc4-00216-ge1c9c9d-dirty #152
[ 71.663828]
[ 71.663828] Call Trace:
[ 71.663828] [<ffffffff8020fdd5>] check_for_bios_corruption+0xb5/0xd0
[ 71.663828] [<ffffffff803a3e1a>] pm_dev_dbg+0x2a/0xa0
[ 71.663828] [<ffffffff803a49c2>] dpm_power_up+0x32/0xf0
Alan
next prev parent reply other threads:[~2008-08-29 12:09 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 [this message]
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
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=48B7E6EE.9090901@tuffmail.co.uk \
--to=alan-jenkins@tuffmail.co.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hpa@zytor.com \
--cc=hugh@veritas.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yhlu.kernel@gmail.com \
--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