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] [day] [month] [year] [list]
Message-ID: <aS_2bPm-ZC9ghGPD@shredder>
Date: Wed, 3 Dec 2025 10:35:56 +0200
From: Ido Schimmel <idosch@...dia.com>
To: Jon Kohler <jon@...anix.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Cong Wang <xiyou.wangcong@...il.com>,
	Nicolas Dichtel <nicolas.dichtel@...nd.com>,
	Jason Wang <jasowang@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] flow_dissector: save computed hash in
 __skb_get_hash_symmetric_net()

On Tue, Dec 02, 2025 at 04:53:43PM +0000, Jon Kohler wrote:
> I thought about that, but the nice bit about doing it like I have it
> is that the flow keys / L4 hash bits are getting evaluated properly.
> 
> If we do it like you’ve suggested, we’re asserting that L4 hash is always
> true, right?

Yes, for some reason I thought that the flow dissector always sets it in
this case.

> How about another helper, that only tun consumes, which does all of these
> things, such that the code still stays clean on the flow dissector side
> and we don’t have to mess with any other callers?
> 
> That would be the middle ground between what you suggested and what I did
> 
> Thoughts?

Not sure. We already have __skb_get_hash_symmetric_net() and
__skb_get_hash_symmetric() and now we will have a third variant. In this
case, maybe adding a 'save_hash' argument is better. It also means that
the next time someone needs to calculate a symmetric hash they will
pause to think if it needs to be set in the skb. I believe that when
skb_get_hash() was replaced with __skb_get_hash_symmetric() in tun the
assumption was that the hash will be stored in the skb as with
skb_get_hash().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ