From: Dave Hansen <dave.hansen@intel.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>, x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
David Woodhouse <dwmw2@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] x86/entry/64: Fix CR3 restore order in paranoid_exit()
Date: Tue, 13 Feb 2018 20:19:53 -0800 [thread overview]
Message-ID: <9f6d258e-8191-9b57-4839-aa7c84e4c829@intel.com> (raw)
In-Reply-To: <2b8ce3a31bcdfffa434269f4abf5d46816b75773.1518575248.git.jpoimboe@redhat.com>
On 02/13/2018 06:27 PM, Josh Poimboeuf wrote:
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -1167,10 +1167,10 @@ ENTRY(paranoid_exit)
> UNWIND_HINT_REGS
> DISABLE_INTERRUPTS(CLBR_ANY)
> TRACE_IRQS_OFF_DEBUG
> + RESTORE_CR3 scratch_reg=%r15 save_reg=%r14
> testl %ebx, %ebx /* swapgs needed? */
> jnz .Lparanoid_exit_no_swapgs
> TRACE_IRQS_IRETQ
> - RESTORE_CR3 scratch_reg=%rbx save_reg=%r14
> SWAPGS_UNSAFE_STACK
> jmp .Lparanoid_exit_restore
> .Lparanoid_exit_no_swapgs:
TRACE_IRQS_* call non-entry functions that are not mapped by the user
CR3. How can this possibly work? What am I missing?
next prev parent reply other threads:[~2018-02-14 4:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 2:27 [PATCH] x86/entry/64: Fix CR3 restore order in paranoid_exit() Josh Poimboeuf
2018-02-14 4:19 ` Dave Hansen [this message]
2018-02-14 7:39 ` Ingo Molnar
2018-02-14 16:11 ` Josh Poimboeuf
2018-02-14 22:27 ` Ingo Molnar
2018-02-14 16:13 ` Thomas Gleixner
2018-02-14 17:16 ` Andy Lutomirski
2018-02-14 23:31 ` [tip:x86/pti] x86/entry/64: Fix CR3 restore " tip-bot for Ingo Molnar
2018-02-15 0:31 ` tip-bot for Ingo Molnar
2018-02-14 7:35 ` [PATCH] x86/entry/64: Fix CR3 restore order " Ingo Molnar
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=9f6d258e-8191-9b57-4839-aa7c84e4c829@intel.com \
--to=dave.hansen@intel.com \
--cc=dwmw2@infradead.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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