Re: [PATCH] x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue

From: Linus Torvalds
Date: Mon Apr 27 2015 - 11:06:22 EST


On Mon, Apr 27, 2015 at 7:57 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> ..end result is just six bytes. That way you can use alternative to
> replace it with one single noop on AMD.

Actually, it looks like we have no good 6-byte no-ops on AMD. So you'd
get two three-byte ones. Oh well. It's still better than five nops
that can't even be decoded all at once.

That said, our NOP tables look to be old for AMD. Looking at the AMD
optimization guide (family 16h), it says to use

66 0F 1F 44 00 00

which seems to be the same as Intel (it's "nopw 0x0(%rax,%rax,1)").

So maybe our AMD nop tables should be updated?

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