Re: [PATCH] Re: BOOT_CS

From: Rene Herman
Date: Mon Feb 23 2004 - 10:26:46 EST


Jamie Lokier wrote:

Your patch uses two instructions to flush the queue (push+ret) instead
of one (jmp or ljmp). Is that documented as reliable?

No. The current arch manuals seem to say nothing definite, but Intel's 386 manual (ie, the cpu, not the arch) from 1986 explicitly says "after setting PG, a jump must follow immediately".

I can easily imagine an implementation which decodes one instruction
after a mode change predictably, but not two.

I doubt that it makes a difference - we're setting PG, not changing the instruction format - but I'd like us to be sure it cannot fail on
things like 386s and 486s, and similar non-Intel chips.

I believe you should either keep it as is, do the long jump (although I don't believe that to be necessary: setup.s already long jumped to us) or only delete the indirect jump (we've just been longjumped to, and identity-mapped, so everything would seem to be normalised already).

In any case, please jump directly after setting PG.

Rene.


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