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: <1472735786.5019.26.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Thu, 01 Sep 2016 06:16:26 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Hadar Hen Zion <hadarh@....mellanox.co.il>
Cc:     Eric Dumazet <edumazet@...gle.com>,
        Hadar Hen Zion <hadarh@...lanox.com>,
        "David S. Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>, Jiri Pirko <jiri@...lanox.com>,
        Jiri Benc <jbenc@...hat.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Shmulik Ladkani <shmulik.ladkani@...il.com>,
        Tom Herbert <tom@...bertland.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Or Gerlitz <ogerlitz@...lanox.com>,
        Amir Vadai <amirva@...lanox.com>, Amir Vadai <amir@...ai.me>
Subject: Re: [PATCH net-next V4 4/4] net/sched: Introduce act_tunnel_key

On Thu, 2016-09-01 at 12:28 +0300, Hadar Hen Zion wrote:

> 
> As you suggested above, I can do it by adding "int action" to struct
> tcf_tunnel_key_paramse.
> But, it means that act_tunnel_key would have a different behavior than
> all the other actions and even though
> "struct tc_action" has a designated parameters to store this action we
> won't use it.
> So it won't be completely clean...
> 
> Do you think we have a cleaner way to protect it?

Fact that the act_ modules had a spinlock made them all share the same
structure.

Now we want RCU protection, here is the thing.

Say you want to access 3 different fields, A, B and C.

If you put A and B in the rcu protected pointer, but leave C in the
'control part, protected by spinlock' 

Then your fast path wont be able to have a consistent view of 3
variables A, B C.

It might read an old value of A & B, and the recently updated C,

Or it might read an old C, and the updated values of A & B

As Cong very kindly pointed to us/me, if we want to be 'clean', we want
to make sure we read a consistent 3-tuple.

I will send updates when I have time to act_mirred.c 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ