Re: __init poisoning for i386, too

From: Ryan Cumming
Date: Fri Oct 08 2004 - 06:33:33 EST


On Friday 08 October 2004 04:08, you wrote:
> On Thu, Oct 07, 2004 at 09:05:45PM +0000, H. Peter Anvin wrote:
> > What's wrong with using 0xCC (breakpoint instruction)?
> > If you want an illegal instruction, 0xFF 0xFF is an illegal
> > instruction, so filling memory with 0xFF will do what you want.
>
> That sounds better than what I suggested.
>

Here's the trivial patch against 2.4.9-rc3-mm3

-Ryan
--- linux-2.6.9-rc3-mm3/arch/i386/mm/init.c 2004-10-08 04:19:46.645395667 -0700
+++ linux-2.6.9-rc3-mm3-new/arch/i386/mm/init.c 2004-10-08 04:21:51.933318774 -0700
@@ -723,7 +723,7 @@
for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
set_page_count(virt_to_page(addr), 1);
- memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE);
+ memset((void *)(addr & ~(PAGE_SIZE-1)), 0xff, PAGE_SIZE);
free_page(addr);
totalram_pages++;
}

Attachment: pgp00000.pgp
Description: PGP signature