[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrW9sCjeRgNZ4h4f-zNzheerxWxEvUyCaPkO1nHqV99EpQ@mail.gmail.com>
Date: Mon, 18 May 2020 13:42:52 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Andy Lutomirski <luto@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Alexandre Chartre <alexandre.chartre@...cle.com>,
Frederic Weisbecker <frederic@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Joel Fernandes <joel@...lfernandes.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Brian Gerst <brgerst@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Will Deacon <will@...nel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Wei Liu <wei.liu@...nel.org>,
Michael Kelley <mikelley@...rosoft.com>,
Jason Chen CJ <jason.cj.chen@...el.com>,
Zhao Yakui <yakui.zhao@...el.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [patch V6 04/37] x86: Make hardware latency tracing explicit
On Mon, May 18, 2020 at 1:03 AM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Andy Lutomirski <luto@...nel.org> writes:
> > On Sun, May 17, 2020 at 1:48 AM Thomas Gleixner <tglx@...utronix.de> wrote:
> >> Remember this is about ensuring that all the state is properly
> >> established before any of this instrumentation muck can happen.
> >>
> >> DR7 handling is specific to #DB and done even before nmi_enter to
> >> prevent recursion.
> >
> > So why is this change needed?
>
> We really want nmi_enter() to be the carefully crafted mechanism which
> establishes correct state in whatever strange context the exception
> hits. Not more, not less.
>
> Random instrumentation has absolutely no business there and I went a
> long way to make sure that this is enforcible by objtool.
>
> Aside of that the tracing which is contained in nmi_enter() is about
> taking timestamps for hardware latency detection. If someone runs
> hardware latency detection with active break/watchpoints then I really
> can't help it.
>
Okay. I'll stop looking for the bug you're fixing, then.
Powered by blists - more mailing lists