From: Borislav Petkov <bp@alien8.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Joerg Roedel <joro@8bytes.org>, Jiri Olsa <jolsa@redhat.com>,
Andi Kleen <ak@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v2 2/3] x86/entry/64: Use the TSS sp2 slot for SYSCALL/SYSRET scratch space
Date: Fri, 7 Sep 2018 10:00:41 +0200 [thread overview]
Message-ID: <20180907080041.GA12849@zn.tnic> (raw)
In-Reply-To: <08e769a0023dbad4bac6f34f3631dbaf8ad59f4f.1536015544.git.luto@kernel.org>
On Mon, Sep 03, 2018 at 03:59:43PM -0700, Andy Lutomirski wrote:
> In the non-trampoline SYSCALL64 path, we use a percpu variable to
> temporarily store the user RSP value. Instead of a separate
> variable, use the otherwise unused sp2 slot in the TSS. This will
> improve cache locality, as the sp1 slot is already used in the same
> code to find the kernel stack. It will also simplify a future
> change to make the non-trampoline path work in PTI mode.
>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
> arch/x86/entry/entry_64.S | 16 +++++++++-------
> arch/x86/include/asm/processor.h | 6 ++++++
> arch/x86/kernel/asm-offsets.c | 3 ++-
> arch/x86/kernel/process_64.c | 2 --
> arch/x86/xen/xen-asm_64.S | 8 +++++---
> 5 files changed, 22 insertions(+), 13 deletions(-)
Reviewed-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2018-09-07 8:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 22:59 [PATCH v2 0/3] x86/pti: Get rid of entry trampolines and add some docs Andy Lutomirski
2018-09-03 22:59 ` [PATCH v2 1/3] x86/entry/64: Document idtentry Andy Lutomirski
2018-09-06 9:50 ` Borislav Petkov
2018-09-08 9:33 ` [tip:x86/pti] " tip-bot for Andy Lutomirski
2018-09-03 22:59 ` [PATCH v2 2/3] x86/entry/64: Use the TSS sp2 slot for SYSCALL/SYSRET scratch space Andy Lutomirski
2018-09-07 8:00 ` Borislav Petkov [this message]
2018-09-08 9:34 ` [tip:x86/pti] " tip-bot for Andy Lutomirski
2018-09-03 22:59 ` [PATCH v2 3/3] x86/pti/64: Remove the SYSCALL64 entry trampoline Andy Lutomirski
2018-09-04 7:04 ` Peter Zijlstra
2018-09-05 21:31 ` Andy Lutomirski
2018-09-07 12:36 ` Peter Zijlstra
2018-09-07 19:54 ` Thomas Gleixner
2018-09-08 0:04 ` Linus Torvalds
2018-09-08 4:32 ` Andy Lutomirski
2018-09-08 6:36 ` Thomas Gleixner
2018-09-08 6:33 ` Thomas Gleixner
2018-09-07 9:35 ` Borislav Petkov
2018-09-07 16:40 ` Josh Poimboeuf
2018-09-08 4:35 ` Andy Lutomirski
2018-09-08 9:35 ` [tip:x86/pti] " tip-bot for Andy Lutomirski
2018-09-08 9:57 ` tip-bot for Andy Lutomirski
2018-09-12 19:33 ` tip-bot for Andy Lutomirski
2018-09-12 19:36 ` tip-bot for Andy Lutomirski
2018-09-04 3:43 ` [PATCH v2 0/3] x86/pti: Get rid of entry trampolines and add some docs Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180907080041.GA12849@zn.tnic \
--to=bp@alien8.de \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=joro@8bytes.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome