[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdca2ca6-6081-7d6f-9c17-a15446ffbb20@linux.intel.com>
Date: Mon, 23 Jul 2018 05:59:24 -0700
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>
Cc: Borislav Petkov <bp@...en8.de>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC 2/2] x86/pti/64: Remove the SYSCALL64 entry trampoline
On 07/22/2018 10:45 AM, Andy Lutomirski wrote:
> static void __init pti_clone_user_shared(void)
> {
> + unsigned cpu;
> +
> pti_clone_p4d(CPU_ENTRY_AREA_BASE);
> +
> + for_each_possible_cpu(cpu) {
> + /*
> + * The SYSCALL64 entry code needs to be able to find the
> + * thread stack and needs one word of scratch space in which
> + * to spill a register. All of this lives in the TSS, in
> + * the sp1 and sp2 slots.
> + */
I had to remind myself about the r/o cpu_entry_area alias here. Should
we maybe call it out explicitly?
/*
* The TSS is also mapped read-only into the cpu_entry_area.
* The cpu_entry_area copy is used r/o by the hardware for the
* hardware stack switching, like interrupt entry.
*
* The copies being mapped here are the normal r/w per-cpu
* areas. We need r/w because we spill a register here.
*/
BTW, since we have this alias, do we still *need* the r/o cpu_entry_area
alias? Or do we still get some value from keeping the thing referenced
by hardware r/o?
Powered by blists - more mailing lists