Re: [PATCH RFC] x86: check for and defend against BIOS memory corruption

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hugh Dickins
Date: Friday, August 29, 2008 - 3:24 am

> On Fri, 29 Aug 2008, Rafa=C5=82 Mi=C5=82ecki wrote:

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=092008-08-29 11:17:16.000000000 +0100
+++ b/arch/x86/kernel/setup.c=092008-08-29 11:19:24.000000000 +0100
@@ -636,11 +636,12 @@ void check_for_bios_corruption(void)
 =09=09unsigned long *addr =3D __va(scan_areas[i].addr);
 =09=09unsigned long size =3D scan_areas[i].size;
=20
-=09=09for(; size; addr++, size--) {
+=09=09for(; size; addr++, size -=3D sizeof(unsigned long)) {
 =09=09=09if (!*addr)
 =09=09=09=09continue;
 =09=09=09printk(KERN_ERR "Corrupted low memory at %p (%lx phys) =3D %08lx\=
n",
 =09=09=09       addr, __pa(addr), *addr);
+=09=09=09*addr =3D 0;
 =09=09=09corruption =3D 1;
 =09=09}
 =09}
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC] x86: check for and defend against BIOS memory ..., Jeremy Fitzhardinge, (Thu Aug 28, 12:52 pm)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Thu Aug 28, 8:28 pm)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 12:21 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 12:22 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 1:02 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Hugh Dickins, (Fri Aug 29, 3:24 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 7:08 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 7:18 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 7:48 am)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Fri Aug 29, 6:15 pm)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Thu Sep 4, 4:04 pm)
Re: [PATCH RFC] x86: check for and defend against BIOS mem ..., Jeremy Fitzhardinge, (Mon Sep 8, 10:16 am)