lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Dec 2009 13:22:41 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
	Wenji Huang <wenji.huang@...cle.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] tracing/filters: Fix MATCH_FRONT_ONLY filter
	matching

On Mon, Dec 14, 2009 at 09:43:37AM +0800, Li Zefan wrote:
> Frederic Weisbecker wrote:
> > On Fri, Dec 11, 2009 at 05:59:28PM +0800, Li Zefan wrote:
> >> MATCH_FRONT_ONLY matching works exactly as MATCH_FULL.
> >>
> >> We should pass the length of the pattern to strncmp().
> >>
> >> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> >> ---
> >>  kernel/trace/trace_events_filter.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
> >> index c8eb1c0..bd492ce 100644
> >> --- a/kernel/trace/trace_events_filter.c
> >> +++ b/kernel/trace/trace_events_filter.c
> >> @@ -262,7 +262,7 @@ static int regex_match_full(char *str, struct regex *r, int len)
> >>  
> >>  static int regex_match_front(char *str, struct regex *r, int len)
> >>  {
> >> -	if (strncmp(str, r->pattern, len) == 0)
> >> +	if (strncmp(str, r->pattern, r->len) == 0)
> >>  		return 1;
> >>  	return 0;
> >>  }
> > 
> > 
> > But it was working before the fix to match full.
> 
> No, it was not working for dyn_string and static_string.
> And as I explained it happened to work for ptr_string by
> the mixture of 2 bugs.


Ah, you're right.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ