Re: __init poisoning for i386, too

From: H. Peter Anvin
Date: Thu Oct 07 2004 - 21:27:13 EST


Followup to: <20041007061610.GU9106@xxxxxxxxxxxxxx>
By author: William Lee Irwin III <wli@xxxxxxxxxxxxxx>
In newsgroup: linux.dev.kernel
>
> 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
> (b) poison __initdata, memsetting to some bit pattern oopsable to dereference
>

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.

-hpa
-
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/