linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: George Spelvin <lkml@sdf.org>, Amit Klein <aksecurity@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Andy Lutomirski <luto@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	tytso@mit.edu, Florian Westphal <fw@strlen.de>,
	Marc Plumb <lkml.mplumb@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [GIT PULL] prandom32 changes for v5.10
Date: Mon, 12 Oct 2020 22:32:26 +0200	[thread overview]
Message-ID: <20201012203226.GA11861@1wt.eu> (raw)

Linus,

Given that nobody objected to this patchset since last update on
prandom32 a month ago, I'm sending you the refreshed one for 5.10.

The following changes since commit bbf5c979011a099af5dc76498918ed7df445635b:

  Linux 5.9 (2020-10-11 14:15:50 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom.git tags/20201012-v3-5.10

for you to fetch changes up to 3486a21c7e5bafbdbc0f7ea5d40f3dad39022bf4:

  random32: add noise from network and scheduling activity (2020-10-12 18:11:51 +0200)

Thanks!
Willy

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

----------------------------------------------------------------
George Spelvin (1):
      random32: make prandom_u32() output unpredictable

Willy Tarreau (1):
      random32: add noise from network and scheduling activity

 drivers/char/random.c   |   1 -
 include/linux/prandom.h |  55 +++++-
 kernel/time/timer.c     |   9 +-
 lib/random32.c          | 438 +++++++++++++++++++++++++++++-------------------
 net/core/dev.c          |   4 +
 5 files changed, 326 insertions(+), 181 deletions(-)

             reply	other threads:[~2020-10-12 20:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 20:32 Willy Tarreau [this message]
     [not found] ` <CANEQ_+Jyf-MZEsvT5iMu0a=waJCiAKdLaOfLHe_py6AXOt-hjQ@mail.gmail.com>
2020-10-20 23:08   ` [GIT PULL] prandom32 changes for v5.10 Linus Torvalds
2020-10-21  3:27     ` Willy Tarreau
2020-10-21 20:52       ` Marc Plumb
2020-10-21 21:20         ` Joe Perches
2020-10-21 21:35           ` Linus Torvalds
2020-10-21 21:41             ` Joe Perches
2020-10-22  2:12               ` Willy Tarreau
2020-10-24 19:34 Willy Tarreau
2020-10-25 18:35 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201012203226.GA11861@1wt.eu \
    --to=w@1wt.eu \
    --cc=Jason@zx2c4.com \
    --cc=aksecurity@gmail.com \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml.mplumb@gmail.com \
    --cc=lkml@sdf.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).