From: Peter Zijlstra <peterz@infradead.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Juergen Gross <jgross@suse.com>,
LKML <linux-kernel@vger.kernel.org>,
He Zhe <zhe.he@windriver.com>,
Joel Fernandes <joel@joelfernandes.org>,
devel@etsukata.com
Subject: Re: [PATCH 3/3] x86/mm, tracing: Fix CR2 corruption
Date: Thu, 4 Jul 2019 11:13:51 +0200 [thread overview]
Message-ID: <20190704091351.GH3463@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190703220057.GJ3402@hirez.programming.kicks-ass.net>
On Thu, Jul 04, 2019 at 12:00:57AM +0200, Peter Zijlstra wrote:
> On Wed, Jul 03, 2019 at 01:27:09PM -0700, Andy Lutomirski wrote:
> > On Wed, Jul 3, 2019 at 3:28 AM root <peterz@infradead.org> wrote:
>
> > > @@ -1338,18 +1347,9 @@ ENTRY(error_entry)
> > > movq %rax, %rsp /* switch stack */
> > > ENCODE_FRAME_POINTER
> > > pushq %r12
> > > -
> > > - /*
> > > - * We need to tell lockdep that IRQs are off. We can't do this until
> > > - * we fix gsbase, and we should do it before enter_from_user_mode
> > > - * (which can take locks).
> > > - */
> > > - TRACE_IRQS_OFF
> >
> > This hunk looks wrong. Am I missing some other place that handles the
> > case where we enter from kernel mode and IRQs were on?
>
> > > - CALL_enter_from_user_mode
> > > ret
> > >
> > > .Lerror_entry_done:
> > > - TRACE_IRQS_OFF
> > > ret
> > >
> > > /*
>
> Did you perchance mean to complain about the .Lerror_entry_done one?
>
> Because I'm not seeing how the one before CALL_enter_from_user_mode can
> ever be from-kernel.
>
> But yes, that .Lerror_entry_done one looks fishy.
That works because idtentry will now do an unconditional TRACE_IRQS_OFF,
note how the patch removes the .if \paranoid around that.
prev parent reply other threads:[~2019-07-04 9:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 10:27 [PATCH 0/3] tracing vs CR2 root
2019-07-03 10:27 ` [PATCH 1/3] x86/paravirt: Make read_cr2() CALLEE_SAVE root
2019-07-03 14:12 ` Juergen Gross
2019-07-03 10:27 ` [PATCH 2/3] x86/entry/32: Simplify common_exception root
2019-07-03 10:27 ` [PATCH 3/3] x86/mm, tracing: Fix CR2 corruption root
2019-07-03 20:22 ` Peter Zijlstra
2019-07-03 20:29 ` Steven Rostedt
2019-07-03 21:51 ` Peter Zijlstra
2019-07-03 20:27 ` Andy Lutomirski
2019-07-03 20:47 ` Steven Rostedt
2019-07-03 22:05 ` Peter Zijlstra
2019-07-04 9:19 ` Peter Zijlstra
2019-07-03 22:00 ` Peter Zijlstra
2019-07-03 22:26 ` Andy Lutomirski
2019-07-04 9:13 ` Peter Zijlstra [this message]
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=20190704091351.GH3463@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=devel@etsukata.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=zhe.he@windriver.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.