From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Kyle Huey <me@kylehuey.com>, Thomas Gleixner <tglx@linutronix.de>,
Alexandre Chartre <alexandre.chartre@oracle.com>,
Andy Lutomirski <luto@kernel.org>,
Robert O'Callahan <rocallahan@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <sean.j.christopherson@intel.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Joel Fernandes <joel@joelfernandes.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>, Brian Gerst <brgerst@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Will Deacon <will@kernel.org>
Subject: Re: [REGRESSION 5.8] x86/entry: DR0 break-on-write not working
Date: Wed, 19 Aug 2020 17:47:31 -0500 [thread overview]
Message-ID: <20200819224731.3edo5lqw6lbuprdx@treble> (raw)
In-Reply-To: <20200819213534.GQ3982@worktop.programming.kicks-ass.net>
On Wed, Aug 19, 2020 at 11:35:34PM +0200, Peter Zijlstra wrote:
> On Wed, Aug 19, 2020 at 12:28:16PM -0700, Kyle Huey wrote:
>
> > > I'm guess that is not the expected outcome, is that the same failure you
> > > saw?
> >
> > Yes. Is status also 0x4d00 for you?
>
> Indeed.
>
> > The program is expected to complete with no assertions firing.
>
> When I comment out the break-on-exec test, the break-on-write test
> succeeds.
>
> When I add a few printk()'s to our #DB handler (6) the program will
> magically work again.
I added some trace_printk()'s and I think the #DB handler is calling
schedule????
exc_debug_user()
irqentry_exit_to_user_mode()
exit_to_user_mode_prepare()
exit_to_user_mode_loop()
schedule()
So #DB schedules out, then the process scheduls in and tells ptrace to
set the data breakpoint in DR7. Then the #DB handler schedules back in
and overwrites DR7 with the original value.
What amazes me is that it successfully schedules back to the end of the
#DB handler finish and everything keeps working.
Do we not have assertions in the scheduler to catch this?
--
Josh
next prev parent reply other threads:[~2020-08-19 22:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 17:53 Kyle Huey
2020-08-19 18:41 ` peterz
2020-08-19 19:28 ` Kyle Huey
2020-08-19 21:35 ` Peter Zijlstra
2020-08-19 22:47 ` Josh Poimboeuf [this message]
2020-08-20 0:14 ` Andy Lutomirski
2020-08-20 3:46 ` Josh Poimboeuf
2020-08-20 8:35 ` peterz
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=20200819224731.3edo5lqw6lbuprdx@treble \
--to=jpoimboe@redhat.com \
--cc=alexandre.chartre@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=brgerst@gmail.com \
--cc=frederic@kernel.org \
--cc=jgross@suse.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=me@kylehuey.com \
--cc=mhiramat@kernel.org \
--cc=paulmck@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rocallahan@gmail.com \
--cc=rostedt@goodmis.org \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.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
all inboxes | Powered by JetHome®