kernel_optimize_test/net/ipv4
Willy Tarreau a5c68f457f secure_seq: use the 64 bits of the siphash for port offset calculation
commit b2d057560b8107c633b39aabe517ff9d93f285e3 upstream.

SipHash replaced MD5 in secure_ipv{4,6}_port_ephemeral() via commit
7cd23e5300 ("secure_seq: use SipHash in place of MD5"), but the output
remained truncated to 32-bit only. In order to exploit more bits from the
hash, let's make the functions return the full 64-bit of siphash_3u32().
We also make sure the port offset calculation in __inet_hash_connect()
remains done on 32-bit to avoid the need for div_u64_rem() and an extra
cost on 32-bit systems.

Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Moshe Kol <moshe.kol@mail.huji.ac.il>
Cc: Yossi Gilad <yossi.gilad@mail.huji.ac.il>
Cc: Amit Klein <aksecurity@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[SG: Adjusted context]
Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-30 09:33:23 +02:00
..
bpfilter
netfilter netfilter: ipt_CLUSTERIP: fix refcount leak in clusterip_tg_check() 2022-01-27 10:54:00 +01:00
af_inet.c gso: do not skip outer ip header in case of ipip and net_failover 2022-03-02 11:42:49 +01:00
ah4.c
arp.c ipv4: Invalidate neighbour for broadcast address upon address addition 2022-04-13 21:00:57 +02:00
bpf_tcp_ca.c
cipso_ipv4.c
datagram.c
devinet.c
esp4_offload.c esp: Fix BEET mode inter address family tunneling on GSO 2022-03-16 14:15:57 +01:00
esp4.c esp: limit skb_page_frag_refill use to a single page 2022-04-27 13:53:48 +02:00
fib_frontend.c ipv4: Invalidate neighbour for broadcast address upon address addition 2022-04-13 21:00:57 +02:00
fib_lookup.h
fib_notifier.c
fib_rules.c
fib_semantics.c net: ipv4: fix route with nexthop object delete warning 2022-04-13 21:01:04 +02:00
fib_trie.c
fou.c
gre_demux.c
gre_offload.c
icmp.c
igmp.c net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter() 2022-05-12 12:25:43 +02:00
inet_connection_sock.c
inet_diag.c
inet_fragment.c inet: frags: annotate races around fqdir->dead and fqdir->high_thresh 2022-01-27 10:54:33 +01:00
inet_hashtables.c secure_seq: use the 64 bits of the siphash for port offset calculation 2022-05-30 09:33:23 +02:00
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c inet: frags: annotate races around fqdir->dead and fqdir->high_thresh 2022-01-27 10:54:33 +01:00
ip_gre.c ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode 2022-05-09 09:05:04 +02:00
ip_input.c
ip_options.c
ip_output.c ipv4: tcp: send zero IPID in SYNACK messages 2022-02-01 17:25:47 +01:00
ip_sockglue.c
ip_tunnel_core.c
ip_tunnel.c
ip_vti.c
ipcomp.c
ipconfig.c
ipip.c
ipmr_base.c
ipmr.c ipmr,ip6mr: acquire RTNL before calling ip[6]mr_free_table() on failure path 2022-02-16 12:54:25 +01:00
Kconfig
Makefile
metrics.c
netfilter.c
netlink.c
nexthop.c
ping.c ping: fix address binding wrt vrf 2022-05-18 10:23:48 +02:00
proc.c
protocol.c
raw_diag.c
raw.c ipv4: raw: lock the socket in raw_bind() 2022-02-01 17:25:47 +01:00
route.c xfrm: fix "disable_policy" flag use when arriving from different devices 2022-05-25 09:17:58 +02:00
syncookies.c tcp: make sure treq->af_specific is initialized 2022-05-09 09:05:04 +02:00
sysctl_net_ipv4.c
tcp_bbr.c
tcp_bic.c
tcp_bpf.c bpf, sockmap: Fix double uncharge the mem of sk_msg 2022-04-08 14:40:21 +02:00
tcp_cdg.c
tcp_cong.c
tcp_cubic.c
tcp_dctcp.c
tcp_dctcp.h
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: fix F-RTO may not work correctly when receiving DSACK 2022-05-09 09:05:06 +02:00
tcp_ipv4.c
tcp_lp.c
tcp_metrics.c
tcp_minisocks.c tcp: md5: incorrect tcp_header_len for incoming connections 2022-05-09 09:05:03 +02:00
tcp_nv.c
tcp_offload.c
tcp_output.c tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT 2022-05-09 09:05:04 +02:00
tcp_rate.c tcp: ensure to use the most recently sent skb when filling the rate sample 2022-05-09 09:05:03 +02:00
tcp_recovery.c
tcp_scalable.c
tcp_timer.c
tcp_ulp.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c tcp: make tcp_read_sock() more robust 2022-03-19 13:44:46 +01:00
tunnel4.c
udp_bpf.c
udp_diag.c
udp_impl.h
udp_offload.c
udp_tunnel_core.c
udp_tunnel_nic.c udp_tunnel: Fix end of loop test in udp_tunnel_nic_unregister() 2022-03-02 11:42:51 +01:00
udp_tunnel_stub.c
udp.c udp: call udp_encap_enable for v6 sockets when enabling encap 2022-04-08 14:39:54 +02:00
udplite.c
xfrm4_input.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c