All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [PATCH] random: do not export add_vmfork_randomness() unless needed
Date: Tue, 1 Mar 2022 14:00:14 -0500	[thread overview]
Message-ID: <Yh5tPt2LoLp442zi@mit.edu> (raw)
In-Reply-To: <20220301142528.243059-1-Jason@zx2c4.com>

On Tue, Mar 01, 2022 at 03:25:28PM +0100, Jason A. Donenfeld wrote:
> Since add_vmfork_randomness() is only called from vmgenid.o, we can
> guard it in CONFIG_VMGENID, similarly to how we do with
> add_disk_randomness() and CONFIG_BLOCK. If we ever have multiple things
> calling into add_vmfork_randomness(), we can add another shared Kconfig
> symbol for that, but for now, this is good enough. Even though
> add_vmfork_randomess() is a pretty small function, removing it means
> that there are only calls to crng_reseed(false) and none to
> crng_reseed(true), which means the compiler can constant propagate it
> and simply crng_reseed().

How about only exporting add_vmfork_randomness if VMGENID is compiled
as a module?  If it's built-in to the kernel, no need to export the
symbol.

					- Ted

  reply	other threads:[~2022-03-01 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01 14:25 [PATCH] random: do not export add_vmfork_randomness() unless needed Jason A. Donenfeld
2022-03-01 19:00 ` Theodore Ts'o [this message]
2022-03-01 22:05   ` Jason A. Donenfeld
2022-03-01 22:14     ` [PATCH v2] " Jason A. Donenfeld

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=Yh5tPt2LoLp442zi@mit.edu \
    --to=tytso@mit.edu \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.