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: <1424482561.5565.34.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Fri, 20 Feb 2015 17:36:01 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Tom Herbert <therbert@...gle.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: Eliminate txhash in sock and reflect RX
 hash on transmit

On Fri, 2015-02-20 at 16:24 -0800, Tom Herbert wrote:
> Instead of having a separate hash value in sock structure for transmit
> and receive, we can use the rxhash value for both and eliminate the
> txhash value. This simplifies the code and reflects the receive hash a
> device provides to the stack for packets transmitted on the associated
> connection. The hash value returned by a device could have meaning when
> used in transmit to identify a flow, for instance the hash may be a flow
> key for a flow created in a (virtual) device. With the flow key provided
> on transmit this can obviate the need to create the hash and do the
> lookup on the fly in transmit.

> +static inline void sock_init_rxhash(struct sock *sk)
> +{
> +	get_random_bytes(&sk->sk_rxhash, sizeof(u32));
>  }


Wow. You just depleted entropy pool completely.

prandom_bytes() or prandom_u32() will just be fine.

Quite frankly, all these changes seem pointless, as you have no
guarantee same hash will be used for packets of a given flow.

Obviously the outgoing SYN packet has no easy way to know what will be
the rxhash in opposite direction. I think I already mentioned this
problem.

So whats the point ?


--
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