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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5229C8F7.7060000@hitachi.com>
Date:	Fri, 06 Sep 2013 21:22:15 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Tom Zanussi <tom.zanussi@...ux.intel.com>,
	linux-kernel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH v8 01/10] tracing: Add support for SOFT_DISABLE to syscall
 events

(2013/09/06 1:01), Steven Rostedt wrote:
> On Mon,  2 Sep 2013 22:52:17 -0500
> 
>> @@ -415,10 +429,15 @@ static void unreg_event_syscall_enter(struct ftrace_event_file *file,
>>  		return;
>>  	mutex_lock(&syscall_trace_lock);
>>  	tr->sys_refcount_enter--;
>> -	clear_bit(num, tr->enabled_enter_syscalls);
>> +	rcu_assign_pointer(tr->enter_syscall_files[num], NULL);
>>  	if (!tr->sys_refcount_enter)
>>  		unregister_trace_sys_enter(ftrace_syscall_enter, tr);
>>  	mutex_unlock(&syscall_trace_lock);
>> +	/*
>> +	 * Callers expect the event to be completely disabled on
>> +	 * return, so wait for current handlers to finish.
>> +	 */
>> +	synchronize_sched();
> 
> We only have to wait for rcu, not preemption correct? Then we need to
> do  synchronize_rcu() instead.

Hmm, the reason why trace_kprobe.c uses synchronize_sched() in unreg
function, is to avoid touching freeing event_file in running kprobe
handlers which run under preemption disabled.

And AFAICS, the tracepoint (on which the syscall tracer based)
call-site uses rcu_read_lock_sched_notrace() instead of rcu_read_lock(),
in that case, I think we should use synchronize_sched(). is that wrong?

Thank you,

-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


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