Re: [PATCH] x86: vdso32/syscall.S: do not load __USER32_DS to %ss

From: Andy Lutomirski
Date: Mon Mar 23 2015 - 15:37:50 EST


On Mon, Mar 23, 2015 at 9:47 AM, Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:
> This vDSO code only gets used by 64-bit kernel,
> not 32-bit. In 64-bit kernels, data segment is the same
> for 32-bit and 64-bit userspace, and SYSRET insn does load %ss
> with its selector. No need to repeat it by hand. Segment loads
> are somewhat expensive: tens of cycles.
>
> Signed-off-by: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
> CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> CC: Steven Rostedt <rostedt@xxxxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxxxxx>
> CC: Borislav Petkov <bp@xxxxxxxxx>
> CC: "H. Peter Anvin" <hpa@xxxxxxxxx>
> CC: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> CC: Oleg Nesterov <oleg@xxxxxxxxxx>
> CC: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> CC: Alexei Starovoitov <ast@xxxxxxxxxxxx>
> CC: Will Drewry <wad@xxxxxxxxxxxx>
> CC: Kees Cook <keescook@xxxxxxxxxxxx>
> CC: x86@xxxxxxxxxx
> CC: linux-kernel@xxxxxxxxxxxxxxx
> ---
>
> Patch was run-tested.

Applied, thanks.

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