https://github.com/torvalds/linux
Revision e8161345ddbb66e449abde10d2fdce93f867eba9 authored by Willy Tarreau on 02 May 2022, 08:46:14 UTC, committed by Jakub Kicinski on 05 May 2022, 02:22:33 UTC
In commit 190cc82489f4 ("tcp: change source port randomizarion at
connect() time"), the table_perturb[] array was introduced and an
index was taken from the port_offset via hash_32(). But it turns
out that hash_32() performs a multiplication while the input here
comes from the output of SipHash in secure_seq, that is well
distributed enough to avoid the need for yet another hash.

Suggested-by: 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>
1 parent 4c2c8f0
History
Tip revision: e8161345ddbb66e449abde10d2fdce93f867eba9 authored by Willy Tarreau on 02 May 2022, 08:46:14 UTC
tcp: drop the hash_32() part from the index calculation
Tip revision: e816134
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 22.2 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.9 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 641.5 KB
Makefile -rw-r--r-- 63.6 KB
README -rw-r--r-- 727 bytes

README

back to top