Re: [PATCH 1/5] x86/asm/entry/32: Massage SYSENTER32 fast path to be nearly identical to SYSCALL32

From: Andy Lutomirski
Date: Mon Jul 27 2015 - 16:50:17 EST


On Mon, Jul 27, 2015 at 1:33 PM, Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:
> This change swaps a few instructions in final register restoring/zeroing
> section of SYSENTER fast path, and adds/deletes a few empty lines.
>
> After this, the difference between SYSENTER and SYCALL fast paths
> (after the prologue which saved pt_regs) is very small:
> they differ merely in the choice of register to hold arg6 (EBP or R9)
> and in the value of EDX on exit: SYSENTER ABI doesn't need to preserve it,
> so it is zeroed. SYSCALL preserves it:

Acked-by: Andy Lutomirski <luto@xxxxxxxxxx>

(I haven't tested it, but this looks Obviously Correct (tm) and
there's no funny stack manipulation in the middle of the changes that
could break things.)

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