summaryrefslogtreecommitdiffstats
tag name20201012-v3-5.10 (64683707d6517f730223b10ec2f765a5890df704)
tag date2020-10-12 22:18:06 +0200
tagged byWilly Tarreau <w@1wt.eu>
tagged objectcommit 3486a21c7e...
downloadprandom-20201012-v3-5.10.tar.gz
This is the cleanup of the latest series of prandom_u32 experimentations
consisting in using SipHash instead of Tausworthe to produce the randoms used by the network stack. The changes to the files were kept minimal, and the controversial commit that used to take noise from the fast_pool (f227e3ec3b5c) was reverted. Instead, a dedicated "net_rand_noise" per_cpu variable is fed from various sources of activities (networking, scheduling) to perturb the SipHash state using fast, non-trivially predictable data, instead of keeping it fully deterministic. The goal is essentially to make any occasional memory leakage or brute-force attempt useless. The resulting code was verified to be very slightly faster on x86_64 than what is was with the controversial commit above, though this remains barely above measurement noise. It was also tested on i386 and arm, and build- tested only on arm64. This v3 is a rebase on top of 5.9-final, and switches __this_cpu_read() for this_cpu_read() to address a crash on i386+SMP+PREEMPT reported by LTP. Nothing else was changed. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJfhLruAAoJEE44bZycYXAvfj0QAJXOZ5JyNO+GfGEq1qzHhu2k bg721DdRJdjVTB/KLq+O+fBTYTzVd4uzCEGiPyqwYTT+LSD4rmvqs32JPmupID6f w/xcLCCLQWAlcvHGG9dkvkzZNmblJnIcJd0488WAC3TMWIsFNMdfYDRZ8zLXebN8 VcQ+g6Gm3uVCuIeZH2dqrj1NsR4rtBw9okBVxFWc1kOKij859MaWFL2fx0901MCJ 9hSrgF2P1r2IS7/i3GgdNZcT3Y6EMVov7J1HJatGmvaWw33RRFUxfyOnVstbayQt hB25mB+fO4zJQyqeDITWFY4LQXz1yIFTxhyl9zpohwfQ1+d9GVQi5Fj+38p+eNVQ ea5sG1P4sDMyp6yqv0UvpnSP5vOfJNOK1WxyGstgiNAyt/rj00hk9iCiVK9zj2Op DLZ5hLljddNRs8BR+d7oVxRnsTH0EMTy8+O9x+a4viqxFX4pcYwd5xYE94Hw3IsJ UlYOB1P7aCeQ2UO08oE5IL+boMNohrvlZ+OECqh3wdH0rjVve2IiLt7fCfIugGNZ ESYN6G4cbHH02Lym7jurBXUkYTPJJpM0E5I/UeniaoCvv+xgfa3SJmQ0y5Pb0cgq PpXRCDdDtbn4guyI4proVVVj7mjIA1N18S1Bb1dsYZjNR6ML12axJ8vC8zYukMKo A67aSOH0aUlp7y1xq8nF =dFAI -----END PGP SIGNATURE-----