linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUGFIX PATCH] tracing/kprobes: Fix strpbrk() argument order
Date: Fri, 2 Nov 2018 16:14:59 +0900	[thread overview]
Message-ID: <20181102161459.86f0622bd01518a2eb06e1d5@kernel.org> (raw)
In-Reply-To: <20181101151014.2feccd51@gandalf.local.home>

On Thu, 1 Nov 2018 15:10:14 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu,  1 Nov 2018 23:29:28 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > Fix strpbrk()'s argument order, it must pass acceptable string
> > in 2nd argument. Note that this can cause a kernel panic where
> > it recovers backup character to code->data.
> > 
> > Fixes: a6682814f371 ("tracing/kprobes: Allow kprobe-events to record module symbol")
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> 
> Thanks Masami,
> 
> I'm pulling this and starting to test it.

Thank you! I still couldn't believe how this bug passed through the tests...

> 
> -- Steve
> 
> > ---
> >  kernel/trace/trace_probe.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> > index 3ef15a6683c0..bd30e9398d2a 100644
> > --- a/kernel/trace/trace_probe.c
> > +++ b/kernel/trace/trace_probe.c
> > @@ -535,7 +535,7 @@ int traceprobe_update_arg(struct probe_arg *arg)
> >  			if (code[1].op != FETCH_OP_IMM)
> >  				return -EINVAL;
> >  
> > -			tmp = strpbrk("+-", code->data);
> > +			tmp = strpbrk(code->data, "+-");
> >  			if (tmp)
> >  				c = *tmp;
> >  			ret = traceprobe_split_symbol_offset(code->data,
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2018-11-02  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 14:29 [BUGFIX PATCH] tracing/kprobes: Fix strpbrk() argument order Masami Hiramatsu
2018-11-01 19:10 ` Steven Rostedt
2018-11-02  7:14   ` Masami Hiramatsu [this message]
2018-11-02 13:54     ` Steven Rostedt
2018-11-03 11:54       ` Masami Hiramatsu
2018-11-03 13:17         ` Steven Rostedt
2018-11-03 16:21           ` Masami Hiramatsu
2018-11-03 16:03         ` [RFC PATCH] tracing/kprobes: Avoid parsing symbol+offset when updating arguments Masami Hiramatsu
2018-11-03 17:43           ` Steven Rostedt
2018-11-04  2:13             ` Masami Hiramatsu

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=20181102161459.86f0622bd01518a2eb06e1d5@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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 NNTP newsgroup(s).