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:	Wed, 3 Jul 2013 19:20:29 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: PATCH? trace_remove_event_call() should fail if call is active

Masami,

I am not sure I understand. And please do not forget I am not
familiar with this code ;)

In short: do you think that the patch I sent "can't help" or
"not enough" ?

If "not enough" then I fully agree.

On 07/03, Masami Hiramatsu wrote:
>
> (2013/07/03 7:23), Oleg Nesterov wrote:
> > On 07/02, Oleg Nesterov wrote:
> >>
> >> So please ignore modules ;)
> >
> > Or lets discuss the change above.
>
> No, I think this still doesn't ensure that we can remove dynamic
> event safely. Since the event is related to several files under
> events/ dir and buffer instances, someone can just stay open the
> files while the event is removed and read/write it.

So, for example, event_enable_write() can happily play with
ftrace_event_file after unregister_trace_probe/free_trace_probe.

Did you mean this?

Sure, but this is another problem? And we already discussed it a
bit, an application can keep the file we need to remove opened.

As for event_enable_write() in particular, we can probably mark
file/call as dead somewhere in trace_remove_event_call(). But
I simply do not understand this code enough, I do not know what
else we should do.

IOW. So far _I think_ we just need the additional changes in
trace_remove_event_call() if it succeeds (with the patch I sent)
to prevent the races like above, but I didn't even try to think
about this problem.

Or I missed your point completely?

Oleg.

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