Arghhhh! Third attempt. Yahoo!Mail has currupted the patch twice previously so I have given up with it. :-(
I have ported the BadRAM patch to 2.5.73-mm2.
It will probably apply cleanly to 2.5.73 as well but I haven't checked it
yet...
I am running it now, it seems to work for me.
It is based it on
http://rick.vanrein.org/linux/badram/software/BadRAM-2.4.20.1.patch
Hello!
On Wed, Jul 02, 2003 at 03:33:26AM +0000, [email protected] wrote:
> It will probably apply cleanly to 2.5.73 as well but I haven't checked it
> yet...
This
> It is based it on
> http://rick.vanrein.org/linux/badram/software/BadRAM-2.4.20.1.patch
and this patches both have a bug that effectively disables all highmem (if present)
when badram patch is activated. I contacted Rick, but never got any answer back.
(in fact I got an auto reply from some Debian bugtracking system, but that's about it).
Corrected 2.4.21 version of the patch is available at
http://linuxhacker.ru/patches/2.4.21-badram.diff
The arch/i386/mm/init.c part:
> +void __init one_highpage_init(struct page *page, int pfn, int bad_ppro,
> + _Bool *bad)
> {
> + *bad = 0;
> if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
> ClearPageReserved(page);
> set_bit(PG_highmem, &page->flags);
> set_page_count(page, 1);
> - __free_page(page);
> +#ifdef CONFIG_BADRAM
> + if (PageBad(page))
> + *bad = 1;
> + else
> +#else
> + __free_page(page);
> +#endif
> totalhigh_pages++;
should obviously get "#else" replaced with "#endif" and original "#endif" should be removed
because otherwise all of the highmem pages are either bad or used right from the initialisation.
(Yes, I have highmem (2G RAM) system with 2 bits bad and I am too lazy to to go to the store to
replace the RAM modules, so I given a patch a try and discovered this problem (which is there
for a long time it seems). I suspect that I am the only one who runs this patch on highmem system,
though ;) )
Bye,
Oleg
Nowdays the biggest problem seems to be slightly incompatible timings
in between motherboard and physical RAM that hurts the most, not so
much non-working bits in RAM devices.
Is there someone who has a patch so that, in case of a kernel OOPS
(or maybe SIGSEGV / SIGILL outside kernel) is checking at least
the code page where IP register points to check if a bit has flipped?
Could be done by checking the page on the Hard Disk or by a CRC method.
Having a bad BIOS parameter so that _one_ bit changes randomly every
hours is not an easy thing to detect - a message on the screen would
be nice...
Etienne.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com
============================================================
From: Oleg Drokin <[email protected]>
Date: 2003/07/02 Wed AM 06:23:24 GMT
To: [email protected]
CC: [email protected]
Subject: Re: [PATCH] BadRAM for 2.5.73-mm2
Hello!
On Wed, Jul 02, 2003 at 03:33:26AM +0000, [email protected] wrote:
> It will probably apply cleanly to 2.5.73 as well but I haven't checked it
> yet...
This
> It is based it on
> http://rick.vanrein.org/linux/badram/software/BadRAM-2.4.20.1.patch
and this patches both have a bug that effectively disables all highmem (if present)
when badram patch is activated. I contacted Rick, but never got any answer back.
(in fact I got an auto reply from some Debian bugtracking system, but that's about it).
Corrected 2.4.21 version of the patch is available at
http://linuxhacker.ru/patches/2.4.21-badram.diff
The arch/i386/mm/init.c part:
> +void __init one_highpage_init(struct page *page, int pfn, int bad_ppro,
> + _Bool *bad)
> {
> + *bad = 0;
> if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
> ClearPageReserved(page);
> set_bit(PG_highmem, &page->flags);
> set_page_count(page, 1);
> - __free_page(page);
> +#ifdef CONFIG_BADRAM
> + if (PageBad(page))
> + *bad = 1;
> + else
> +#else
> + __free_page(page);
> +#endif
> totalhigh_pages++;
should obviously get "#else" replaced with "#endif" and original "#endif" should be removed
because otherwise all of the highmem pages are either bad or used right from the initialisation.
(Yes, I have highmem (2G RAM) system with 2 bits bad and I am too lazy to to go to the store to
replace the RAM modules, so I given a patch a try and discovered this problem (which is there
for a long time it seems). I suspect that I am the only one who runs this patch on highmem system,
though ;) )
Bye,
Oleg
============================================================
Thanks Oleg!
Strangely enough I had this right but then "fixed" it. I obviously had to manually apply the patch to arch/i386/mm/init.c since there are a few logic changes etc. I only re-inserted the bug when checking the changes I had made compared to the original patch and assumed that I had been wrong (I assumed the original patch worked ;-)).
Attached is the new patch.