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:	Tue, 09 Sep 2014 08:20:22 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	John Fastabend <john.fastabend@...il.com>
Cc:	xiyou.wangcong@...il.com, davem@...emloft.net, jhs@...atatu.com,
	netdev@...r.kernel.org, paulmck@...ux.vnet.ibm.com,
	brouer@...hat.com
Subject: Re: [net-next PATCH v3 02/15] net: rcu-ify tcf_proto

On Tue, 2014-09-09 at 08:15 -0700, John Fastabend wrote:

> 
> You mean RCU_INIT_POINTER() correct?

Right, I got this correct for other reviews ;)

> 
> And to be clear which special case in rcupdate.h:999 applies here,
> 	
>   * 1.   This use of RCU_INIT_POINTER() is NULLing out the pointer -or-
>   * 2.   The caller has taken whatever steps are required to prevent
>   *      RCU readers from concurrently accessing this pointer -or-
>   * 3.   The referenced data structure has already been exposed to
>   *      readers either at compile time or via rcu_assign_pointer() -and-
>   *      a.      You have not made -any- reader-visible changes to
>   *              this structure since then -or-
>   *      b.      It is OK for readers accessing this structure from its
>   *              new location to see the old state of the structure. (For
>   *              example, the changes were to statistical counters or to
>   *             other state where exact synchronization is not required.)
> 

In fact, everytime we remove an item from rcu protected list, its fine
to use RCU_INIT_POINTER

RCU_INIT_POINTER(*pprev, item->next);

Because we do not touch chain starting from item->next

> 
> Its only NULLing out the pointer in special cases (case 1), with the
> qdisc lock dropped like in the last patch for ingress qdisc we may have
> concurrent readers (case 2) doing classification which will be walking
> the filter list, and with the tcf_ops change() its not clear to me that
> we can guarantee the structure has not been updated as stated in (case
> 3a).
> 
> So the case here is 3b we are just updating the list structure to skip
> an entry and any old state is correct.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ