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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Oct 2017 01:12:38 +0000 (UTC)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     rostedt <rostedt@...dmis.org>
Cc:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Mark Rutland <mark.rutland@....com>,
        David Howells <dhowells@...hat.com>,
        linux-arch <linux-arch@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will.deacon@....com>
Subject: Re: [PATCH RFC tip/core/rcu 11/15] tracepoint: Remove
 smp_read_barrier_depends() from comment

----- On Oct 9, 2017, at 8:31 PM, rostedt rostedt@...dmis.org wrote:

> [ added Mathieu ]
> 
> On Mon,  9 Oct 2017 17:22:45 -0700
> "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:
> 
>> The comment in tracepoint_add_func() mentions smp_read_barrier_depends(),
>> whose use should be quite restricted.  This commit updates the comment
>> to instead mention the smp_store_release() and rcu_dereference_sched()
>> that the current code actually uses.
>> 
>> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
>> Cc: Ingo Molnar <mingo@...nel.org>
>> Cc: Steven Rostedt <rostedt@...dmis.org>
> 
> Acked-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> 

Yeah I think we don't need to spell out the implementation of
rcu_dereference_sched() there (which actually uses lockless_dereference(),
which indeed ends up relying on smp_read_barrier_depends()). The comment
was a bit too low-level for the benefit of its audience.

I agree with the change.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>

Thanks,

Mathieu

> -- Steve
> 
>> ---
>>  kernel/tracepoint.c | 9 ++++-----
>>  1 file changed, 4 insertions(+), 5 deletions(-)
>> 
>> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
>> index 685c50ae6300..671b13457387 100644
>> --- a/kernel/tracepoint.c
>> +++ b/kernel/tracepoint.c
>> @@ -212,11 +212,10 @@ static int tracepoint_add_func(struct tracepoint *tp,
>>  	}
>>  
>>  	/*
>> -	 * rcu_assign_pointer has a smp_wmb() which makes sure that the new
>> -	 * probe callbacks array is consistent before setting a pointer to it.
>> -	 * This array is referenced by __DO_TRACE from
>> -	 * include/linux/tracepoints.h. A matching smp_read_barrier_depends()
>> -	 * is used.
>> +	 * rcu_assign_pointer has as smp_store_release() which makes sure
>> +	 * that the new probe callbacks array is consistent before setting
>> +	 * a pointer to it.  This array is referenced by __DO_TRACE from
>> +	 * include/linux/tracepoint.h using rcu_dereference_sched().
>>  	 */
>>  	rcu_assign_pointer(tp->funcs, tp_funcs);
> >  	if (!static_key_enabled(&tp->key))

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ