Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2256335ybv; Fri, 14 Feb 2020 14:50:21 -0800 (PST) X-Google-Smtp-Source: APXvYqxRBaNvUrTax2b0YfbXRewftOW5B3A6kvEw7tskAqgeM2/HJG5LGA0z4lELj5nIlu/s3MXv X-Received: by 2002:a9d:5888:: with SMTP id x8mr3910044otg.361.1581720621345; Fri, 14 Feb 2020 14:50:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581720621; cv=none; d=google.com; s=arc-20160816; b=F1f0y78fZ4/OdEJkT9cWLcm+Jv6ClaQ+pGEHv9U8T8gUVFaB0zN+RGM/wXDUyFpOA/ NfNVXiHCVbY1S6wUv4+igxkMW5NYQ43PmPrCzjhZ+2lqEzq0CHMcWObgRuyQKz56eRe8 4O+Kljcfy6bM17Z1bYp71qG7XUoHHPx/Q9BP8w/+SzkNYER9krVIr/vLwZoGPUjYqzd5 iCpkz31xe/v879vcLEUV2EU6/AzG1c2+lKharzZNmxZKWHE/21dZvRPjs6TerDLbBcYM 6wfbdJ7eWlTLj2OlvQKOAnm/RRjc6MNO/IyDtq7BtAD50oJIrRih2UbcwrcdbE5QJJW1 R48w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lXM1TbG2cuZB2z/8ryXjowLVQq+yl2kiSa6UEl2UUxA=; b=DYx4RInDedkKasSAl0Y5vVJ9hPcVf8AEr2SrBwRpd8qk7j9Pf9GwCFiNOnLziPJmyy rohofXttRiU6GCd1n/4sDfA01xepYsHk+ZT4Bbm+I40sZOYRaTXRVP4j4YwAKUe2uujq jcNoXebRDO6Bi1KE3DfQm/gHzVxqu0k+0B2G3Zcu/GGMt4tXh+KAoAykdFOwxk0UE+UO OLa2vgtV60iw3e6VdANfpt/3dN9rQKLMg5ZlMSqcXcHrUVAnPYTfUofWUkpW7Jk5jWTJ V4dsVPVB8+If40tCAhmQwWlVI5qnvCxwuQyS/KU3xn9ejHIPpzZd/RTGmjmzoGd91njE e/yA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si3233243oim.195.2020.02.14.14.50.09; Fri, 14 Feb 2020 14:50:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727906AbgBNWs7 (ORCPT + 99 others); Fri, 14 Feb 2020 17:48:59 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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