linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>, Ted Tso <tytso@mit.edu>,
	andreas.steffen@strongswan.org, sandyinchina@gmail.com,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] random: Remove kernel blocking API
Date: Tue, 09 Jun 2015 18:19:42 +0800	[thread overview]
Message-ID: <E1Z2GdC-0002nC-Br@gondolin.me.apana.org.au> (raw)
In-Reply-To: 20150609101830.GA10521@gondor.apana.org.au

This patch removes the kernel blocking API as it has been completely
replaced by the callback API.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 drivers/char/random.c  |   12 ------------
 include/linux/random.h |    1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index a1576ed..d0da5d8 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1265,18 +1265,6 @@ void get_random_bytes(void *buf, int nbytes)
 EXPORT_SYMBOL(get_random_bytes);
 
 /*
- * Equivalent function to get_random_bytes with the difference that this
- * function blocks the request until the nonblocking_pool is initialized.
- */
-void get_blocking_random_bytes(void *buf, int nbytes)
-{
-	if (unlikely(nonblocking_pool.initialized == 0))
-		wait_event(urandom_init_wait, nonblocking_pool.initialized);
-	extract_entropy(&nonblocking_pool, buf, nbytes, 0, 0);
-}
-EXPORT_SYMBOL(get_blocking_random_bytes);
-
-/*
  * Add a callback function that will be invoked when the nonblocking
  * pool is initialised.
  *
diff --git a/include/linux/random.h b/include/linux/random.h
index 30e2aca..e651874 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -21,7 +21,6 @@ extern void add_input_randomness(unsigned int type, unsigned int code,
 extern void add_interrupt_randomness(int irq, int irq_flags);
 
 extern void get_random_bytes(void *buf, int nbytes);
-extern void get_blocking_random_bytes(void *buf, int nbytes);
 extern int add_random_ready_callback(struct random_ready_callback *rdy);
 extern void del_random_ready_callback(struct random_ready_callback *rdy);
 extern void get_random_bytes_arch(void *buf, int nbytes);

  parent reply	other threads:[~2015-06-09 10:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-06  2:16 [PATCH] crypto: use list to stage async seeding requests Stephan Mueller
2015-06-09  6:49 ` Herbert Xu
2015-06-09 10:18   ` [PATCH 0/3] random: Replace kernel blocking API with callback API Herbert Xu
2015-06-09 10:19     ` [PATCH 1/3] random: Add callback API for random pool readiness Herbert Xu
2015-06-09 10:19     ` [PATCH 2/3] crypto: drbg - Use callback API for random readiness Herbert Xu
2015-06-09 12:23       ` Stephan Mueller
2015-06-09 13:24         ` Herbert Xu
2015-06-09 10:19     ` Herbert Xu [this message]
2015-06-09 10:21     ` Herbert Xu
2015-06-09 13:55     ` Herbert Xu

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=E1Z2GdC-0002nC-Br@gondolin.me.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=andreas.steffen@strongswan.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandyinchina@gmail.com \
    --cc=smueller@chronox.de \
    --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).