From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H . Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@kernel.org>,
systemtap@sourceware.org,
Linus Torvalds <torvalds@linux-foundation.org>,
fenghua.yu@intel.com
Subject: Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping
Date: Mon, 13 Jun 2016 23:20:00 -0000 [thread overview]
Message-ID: <20160613192019.219a3a5f@gandalf.local.home> (raw)
In-Reply-To: <20160613191345.6bdeb535@gandalf.local.home>
On Mon, 13 Jun 2016 19:13:45 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> > # cd /sys/kernel/debug/tracing
> > # echo p copy_user_enhanced_fast_string+5 > kprobe_events
> > # echo 1 > events/kprobes/enable
> >
> > And you'll see a kernel panic on do_debug(), since the debug
> > trap is not handled by kprobes.
> >
> > To fix this problem, we just need to clear the TF bit when
> > resetting running kprobe.
> >
>
> This should definitely be marked for stable, and I bisected it all the
> way down to this commit: f4cb1cc18f364d "x86-64, copy_user: Remove zero
> byte check before copy user buffer."
>
> I reverted that commit and sure enough, this bug goes away. I'm not
> saying the revert should be done. I'm just doing an FYI, and showing how
> changes that appear to be a nice clean up can have subtle effects. I'm
> not even sure how that change caused this to be a problem with kprobes.
>
Nevermind, reverting that commit only moved the location of the
"rep movsb" that you were placing the kprobe on. When I do:
echo "p copy_user_enhanced_fast_string+9" > kprobe_events
I get the same result.
That means we need to make that stable tag even earlier.
-- Steve
next prev parent reply other threads:[~2016-06-13 23:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-11 14:07 Masami Hiramatsu
2016-06-13 4:30 ` Ananth N Mavinakayanahalli
2016-06-13 23:14 ` Steven Rostedt
2016-06-13 23:20 ` Steven Rostedt [this message]
2016-06-14 1:20 ` Masami Hiramatsu
2016-06-14 9:59 ` 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=20160613192019.219a3a5f@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=ananth@linux.vnet.ibm.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=systemtap@sourceware.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).