Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1641097
| From | Stephan Müller <smueller@chronox.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v11 2/5] random: conditionally compile code depending on LRNG |
| Date | 2017-05-14 16:40 +0200 |
| Message-ID | <tH2QF-2Jn-7@gated-at.bofh.it> (permalink) |
| References | <tH2QF-2Jn-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When selecting the LRNG for compilation, disable the legacy /dev/random
implementation.
The LRNG is a drop-in replacement for the legacy /dev/random which
implements the same in-kernel and user space API. Only the hooks of
/dev/random into other parts of the kernel need to be disabled.
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 acff943..2a8d748 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -428,8 +428,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.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v11 0/5] /dev/random - a new approach Stephan Müller <smueller@chronox.de> - 2017-05-14 16:40 +0200 [PATCH v11 2/5] random: conditionally compile code depending on LRNG Stephan Müller <smueller@chronox.de> - 2017-05-14 16:40 +0200 [PATCH v11 1/5] crypto: DRBG - externalize DRBG functions for LRNG Stephan Müller <smueller@chronox.de> - 2017-05-14 16:40 +0200 [PATCH v11 4/5] LRNG - enable compile Stephan Müller <smueller@chronox.de> - 2017-05-14 16:40 +0200
csiph-web