[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48B802D2.5050501@goop.org>
Date: Fri, 29 Aug 2008 07:08:18 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Hugh Dickins <hugh@...itas.com>
CC: Rafał Miłecki <zajec5@...il.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Yinghai Lu <yhlu.kernel@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Alan Jenkins <alan-jenkins@...fmail.co.uk>,
"H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] x86: check for and defend against BIOS memory corruption
Hugh Dickins 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 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)) {
>
Oops, yes.
> if (!*addr)
> continue;
> printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
> addr, __pa(addr), *addr);
> + *addr = 0;
>
Good idea.
> corruption = 1;
> }
> }
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists