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: <20240228064859.423a7c5e@kernel.org>
Date: Wed, 28 Feb 2024 06:48:59 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
 <netdev@...r.kernel.org>, Ido Schimmel <idosch@...dia.com>, David Ahern
 <dsahern@...nel.org>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next 2/7] net: nexthop: Add NHA_OP_FLAGS

On Wed, 28 Feb 2024 11:50:33 +0100 Petr Machata wrote:
> > Why bitfiled? You never use the mask.
> > bitfield gives you the ability to do RMW "atomically" on object fields.
> > For op flags I don't think it makes much sense.  
> 
> Mostly because we get flag validation for free, whereas it would need to
> be hand-rolled for u32. 

NLA_POLICY_MASK() ?

> But also I don't know what will be useful in the
> future. It would be silly to have to add another flags attribute as
> bitfield because this time we actually care about toggling single bits
> of an object.

IDK how you can do RMW on operation flags, that only makes sense if
you're modifying something. Besides you're not using BITFIELD right,
you're ignoring the mask completely now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ