[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1260544231.2146.360.camel@gandalf.stny.rr.com>
Date: Fri, 11 Dec 2009 10:10:31 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Frederic Riss <frederic.riss@...il.com>,
Li Zefan <lizf@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>,
Wenji Huang <wenji.huang@...cle.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] ftrace: Fix MATCH_END_ONLY filter matching
On Fri, 2009-12-11 at 13:27 +0100, Frederic Weisbecker wrote:
> On Fri, Dec 11, 2009 at 01:20:04PM +0100, Frederic Riss wrote:
> > 2009/12/11 Li Zefan <lizf@...fujitsu.com>:
> > > For '*foo' pattern, we should allow any string ending with
> > > 'foo', but ftrace filter incorrectly disallows strings
> > > like bar_foo_foo:
> > [...]
> > > case MATCH_END_ONLY:
> > > - ptr = strstr(str, regex);
> > > - if (ptr && (ptr[len] == 0))
> > > + slen = strlen(str);
> > > + if (slen >= len && memcpy(str + slen - len, regex, len))
> > > matched = 1;
> >
> > Shouldn't that be memcmp() == 0? I don't see how memcpy might serve as
> > a compare operator.
> >
> > Fred.
>
>
> Oh you're right, I reviewed it too quickly. Perhaps the star's
> alignment made it possible for only one Frederic to review it
> the right way...
>
The stars are still fuzzy to me. How does memcpy work here?
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists