From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93E3BC3F68F for ; Fri, 14 Feb 2020 22:48:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66FC22082F for ; Fri, 14 Feb 2020 22:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727896AbgBNWs6 (ORCPT ); Fri, 14 Feb 2020 17:48:58 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33776 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727822AbgBNWs6 (ORCPT ); Fri, 14 Feb 2020 17:48:58 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-101.corp.google.com [104.133.0.101] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01EMljDT018457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Feb 2020 17:47:45 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id AD4A242032C; Fri, 14 Feb 2020 17:47:44 -0500 (EST) Date: Fri, 14 Feb 2020 17:47:44 -0500 From: "Theodore Y. Ts'o" To: Rob Herring Cc: Masami Hiramatsu , "linux-kernel@vger.kernel.org" , Android Kernel Team , Mark Salyzyn , Arnd Bergmann , Greg Kroah-Hartman , Richard Henderson , Mark Brown , Kees Cook , Hsin-Yi Wang , Vasily Gorbik , Andrew Morton , Steven Rostedt , Mike Rapoport , Arvind Sankar , Dominik Brodowski , Thomas Gleixner , Alexander Potapenko , Jonathan Corbet , Mauro Carvalho Chehab , Josh Poimboeuf , Pawan Gupta , Juergen Gross , Linux Doc Mailing List Subject: Re: [PATCH 2/3] random: rng-seed source is utf-8 Message-ID: <20200214224744.GC439135@mit.edu> References: <158166060044.9887.549561499483343724.stgit@devnote2> <158166062748.9887.15284887096084339722.stgit@devnote2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Fri, Feb 14, 2020 at 01:58:35PM -0600, Rob Herring wrote: > On Fri, Feb 14, 2020 at 12:10 AM Masami Hiramatsu wrote: > > > > From: Mark Salyzyn > > > > 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 > > Typically? Why is that? > > > characters which has a bitness of roughly 6 to give appropriate > > credit due for the entropy. This is why I really think what gets specified via the boot command line, or bootconfig, should specify the bits of entropy and the entropy seed *separately*, so it can be specified explicitly, instead of assuming that *everyone knows* that rng-seed is either (a) a binary string, or (b) utf-8, or (c) a hex string. The fact is, everyone does *not* know, or everyone will have a different implementation, which everyone will say is *obviously* the only way to go.... - Ted