Re: __init poisoning for i386, too

From: Andi Kleen
Date: Thu Oct 07 2004 - 06:29:58 EST


William Lee Irwin III <wli@xxxxxxxxxxxxxx> writes:

> On Thu, Oct 07, 2004 at 12:18:55AM +0200, Pavel Machek wrote:
> > Overwrite __init section so calls to __init functions from normal code
> > are catched, reliably. I wonder if this should be configurable... but
> > it is configurable on x86-64 so I copied it. Please apply,
>
> Any chance we could:
> (a) set the stuff to 0x0f0b so illegal instructions come of it; jumps are
> most often aligned to something > 16 bits anyway

0xcc is an int3, that already causes an oops.

> (b) poison __initdata, memsetting to some bit pattern oopsable to dereference

Would be a good idea yes. I will add it to x86-64.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/