[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <158166062748.9887.15284887096084339722.stgit@devnote2>
Date: Fri, 14 Feb 2020 15:10:27 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: kernel-team@...roid.com, Mark Salyzyn <salyzyn@...roid.com>,
Theodore Ts'o <tytso@....edu>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Richard Henderson <richard.henderson@...aro.org>,
Mark Brown <broonie@...nel.org>,
Kees Cook <keescook@...omium.org>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Vasily Gorbik <gor@...ux.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
Arvind Sankar <nivedita@...m.mit.edu>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Thomas Gleixner <tglx@...utronix.de>,
Alexander Potapenko <glider@...gle.com>,
Jonathan Corbet <corbet@....net>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Juergen Gross <jgross@...e.com>, Rob Herring <robh@...nel.org>,
linux-doc@...r.kernel.org
Subject: [PATCH 2/3] random: rng-seed source is utf-8
From: Mark Salyzyn <salyzyn@...roid.com>
commit 428826f5358c922dc378830a1717b682c0823160
("fdt: add support for rng-seed") makes the assumption that the data
in rng-seed is binary, when it is typically constructed of utf-8
characters which has a bitness of roughly 6 to give appropriate
credit due for the entropy.
Fixes: 428826f5358c ("fdt: add support for rng-seed")
Signed-off-by: Mark Salyzyn <salyzyn@...roid.com>
Cc: linux-kernel@...r.kernel.org
Cc: kernel-team@...roid.com
Cc: Kees Cook <keescook@...omium.org>
Cc: Theodore Y. Ts'o <tytso@....edu>
---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index c7f9584de2c8..ee21a6a584b1 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -2306,7 +2306,7 @@ EXPORT_SYMBOL_GPL(add_hwgenerator_randomness);
void add_bootloader_randomness(const void *buf, unsigned int size)
{
if (IS_ENABLED(CONFIG_RANDOM_TRUST_BOOTLOADER))
- add_hwgenerator_randomness(buf, size, size * 8);
+ add_hwgenerator_randomness(buf, size, size * 6);
else
add_device_randomness(buf, size);
}
Powered by blists - more mailing lists