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


Groups > linux.kernel > #1689857

[RFC PATCH v12 2/4] random: conditionally compile code depending on LRNG

From Stephan Müller <smueller@chronox.de>
Newsgroups linux.kernel
Subject [RFC PATCH v12 2/4] random: conditionally compile code depending on LRNG
Date 2017-07-18 10:20 +0200
Message-ID <u4vTz-8ne-1@gated-at.bofh.it> (permalink)
References <u4vTz-8ne-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When selecting the LRNG for compilation, disable add_disk_randomness and
its supporting function.

CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
 include/linux/genhd.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index e619fae..7e08ebc 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -422,8 +422,13 @@ extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
 extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);
 
 /* drivers/char/random.c */
+#ifdef CONFIG_LRNG
+#define add_disk_randomness(disk) do {} while (0)
+#define rand_initialize_disk(disk) do {} while (0)
+#else
 extern void add_disk_randomness(struct gendisk *disk) __latent_entropy;
 extern void rand_initialize_disk(struct gendisk *disk);
+#endif
 
 static inline sector_t get_start_sect(struct block_device *bdev)
 {
-- 
2.9.4

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


Thread

[RFC PATCH v12 2/4] random: conditionally compile code depending on LRNG Stephan Müller <smueller@chronox.de> - 2017-07-18 10:20 +0200
  Re: [RFC PATCH v12 2/4] random: conditionally compile code depending  on LRNG Arnd Bergmann <arnd@arndb.de> - 2017-07-18 10:20 +0200
    Re: [RFC PATCH v12 2/4] random: conditionally compile code depending on LRNG Stephan Müller <smueller@chronox.de> - 2017-07-18 10:40 +0200
      Re: [RFC PATCH v12 2/4] random: conditionally compile code depending  on LRNG Arnd Bergmann <arnd@arndb.de> - 2017-07-18 10:50 +0200
        Re: [RFC PATCH v12 2/4] random: conditionally compile code depending on LRNG Stephan Müller <smueller@chronox.de> - 2017-07-18 11:00 +0200

csiph-web