Re: [rfc] [patch] kernel hooks

Alan Cox (alan@lxorguk.ukuu.org.uk)
03 Oct 2002 15:00:52 +0100


On Thu, 2002-10-03 at 14:32, Richard J Moore wrote:
>
> > You must also ensure that the code you are modifying isnt on an IRQ path
> > (if it is you must do spin locks and then be very careful about cross
> > cpu tlb deadlocks). Finally you have no choice but to ensure you never
> > use it on the NMI path
>
> Why do we need a spinlock? We change one byte, we are not concered about
> when exactly that takes effect, only that there are always valid
> instructions in the pipeline.

Because you are programming for real silicon not for the imaginary
perfect processor. Read the x86 errata

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