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]
Message-ID: <20091208094825.GA5035@nowhere>
Date:	Tue, 8 Dec 2009 10:48:27 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/13] ftrace: Call trace_parser_clear() properly

On Tue, Dec 08, 2009 at 11:15:30AM +0800, Li Zefan wrote:
> I found a weird behavior:
> 
>   # echo 'fuse:*' > set_ftrace_filter
>   bash: echo: write error: Invalid argument
>   # cat set_ftrace_filter
>   fuse_dev_fasync
>   fuse_dev_poll
>   fuse_copy_do
> 
> We should call trace_parser_clear() no matter ftrace_process_regex()
> returns 0 or -errno.
> 
> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> ---
>  kernel/trace/ftrace.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 08a3fb5..ff8aecd 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2208,10 +2208,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
>  	    !trace_parser_cont(parser)) {
>  		ret = ftrace_process_regex(parser->buffer,
>  					   parser->idx, enable);
> +		trace_parser_clear(parser);
>  		if (ret)
>  			goto out_unlock;
> -
> -		trace_parser_clear(parser);
>  	}


I'm missing something. How that can happen. Anytime we reopen
the file, the parser is re-allocated.

I guess that happens if you open in rw mode? But not using the
example in the changelog?

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