Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1547786

[PATCH 1/8] random: remove stale maybe_reseed_primary_crng

From Stephan Müller <smueller@chronox.de>
Newsgroups linux.kernel
Subject [PATCH 1/8] random: remove stale maybe_reseed_primary_crng
Date 2016-12-27 23:50 +0100
Message-ID <sT8Jc-86X-27@gated-at.bofh.it> (permalink)
References <sT8Jb-86X-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From 5e84a71d4c4b3c7f015878c0907102634603d270 Mon Sep 17 00:00:00 2001
From: Stephan Mueller <stephan.mueller@atsec.com>
Date: Thu, 15 Dec 2016 12:42:33 +0100
Subject: 

The function maybe_reseed_primary_crng is not used anywhere and thus can
be removed. Besides, it contains the check crng_init > 2 which will
never become true and thus would never trigger a reseed of the ChaCha20
primary DRNG.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
 drivers/char/random.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 1ef2640..8e5ab20 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -855,13 +855,6 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
 	spin_unlock_irqrestore(&primary_crng.lock, flags);
 }
 
-static inline void maybe_reseed_primary_crng(void)
-{
-	if (crng_init > 2 &&
-	    time_after(jiffies, primary_crng.init_time + CRNG_RESEED_INTERVAL))
-		crng_reseed(&primary_crng, &input_pool);
-}
-
 static inline void crng_wait_ready(void)
 {
 	wait_event_interruptible(crng_init_wait, crng_ready());
-- 
2.9.3

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] random: cleanup of code after removal of nonblocking pool Stephan Müller <smueller@chronox.de> - 2016-12-27 23:50 +0100
  [PATCH 3/8] random: trigger random_ready callback upon crng_init == 1 Stephan Müller <smueller@chronox.de> - 2016-12-27 23:50 +0100
  [PATCH 2/8] random: remove stale urandom_init_wait Stephan Müller <smueller@chronox.de> - 2016-12-27 23:50 +0100
  [PATCH 5/8] random: remove variable limit Stephan Müller <smueller@chronox.de> - 2016-12-27 23:50 +0100
  [PATCH 1/8] random: remove stale maybe_reseed_primary_crng Stephan Müller <smueller@chronox.de> - 2016-12-27 23:50 +0100
  [PATCH 8/8] random: move FIPS continuous test to output functions Stephan Müller <smueller@chronox.de> - 2016-12-27 23:50 +0100

csiph-web