Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2854519yba; Fri, 10 May 2019 21:29:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHihdhlrKkmmHmV3ap5NxV0eyT1lygI7ISUhJ/bJKGqsKMq6T1SQKH8/BLS3j26dFGNIsT X-Received: by 2002:a63:e451:: with SMTP id i17mr18220664pgk.312.1557548982188; Fri, 10 May 2019 21:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557548982; cv=none; d=google.com; s=arc-20160816; b=ZGfVAda9f8k0sKR5Oi1ON3fW6vqerAoW+EnZvFkTsNcg5hXVZObz3hr4gq1bkd7fCL fcWjWG+UCkmmOV1Cn8v8wmigwGHlGjBt3SzZCN9GVC0Ot2D6tj+jeIbYBWwX7CxGk1rq uRObqgxH+gwbtwQ2R5x4u8E+WMqlsY+X2vrvZbQ+oK1cPYQBb8NLr9tKzjFqb3iw5ubE eRY1NdbmD+BuoBsbs8saUyJ6r0Y5k7+v4m6lNP1bnX8A3XSCr0ABI0j9ef8I2DoByov/ iKvh8s/0fcrPjRYkCO22YNiXefmIx27G3dCG3GG7fzom+VeFjx6EcVcc29JvznPkZZIo fahg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:message-id:to:cc:subject :from:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=hRMart1iNsOfZ4XtJXaVBFmcLibgJ1Ww0Q9rcJYqncQ=; b=JPiK8T39mgB9mYWSkJeSWcVrGm/9keSyRz0AcFmLYijs7afO6Qjf6tZ3eytaxt32pK MWwc/4nJL6CykSnBtgfBYf0hja0f6MILkq3TMHvhNOkZi6J6LGxObDsbX/mnIfvbmLc2 IX0bbzPPE7Sy7WY+Zk/hep0TxMGx8FHYeZABMLrhfEhSzfifTMaQqfZ6r3nDnV2jfbto 8zMHpmJi4B5R/++wQG2enidcJIaAXW/gXqiwtYoXXnv8PXoXLAcyLuXqnVWXeLYR9xt9 uvYObkay7VY7w7JU1K2VmJBLLMOUS34mGZGd0M03kdv0gBf0vcn4LIIw1KQ8dCO1Zhb/ bvSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mxuU3lqG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si9743100pgp.118.2019.05.10.21.29.25; Fri, 10 May 2019 21:29:42 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=mxuU3lqG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbfEKE2i (ORCPT + 99 others); Sat, 11 May 2019 00:28:38 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:46543 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfEKE2i (ORCPT ); Sat, 11 May 2019 00:28:38 -0400 Received: by mail-pf1-f195.google.com with SMTP id y11so4241635pfm.13 for ; Fri, 10 May 2019 21:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references:from :subject:cc:to:message-id:user-agent:date; bh=hRMart1iNsOfZ4XtJXaVBFmcLibgJ1Ww0Q9rcJYqncQ=; b=mxuU3lqGlXDteyUl0MMAp2DhltFQ/CtjpqvD8F3YkxvLDZN/zIoabjRQTvV8rcF69a usUWAH0yKi00jc2+uaHYCKIiaqiQYAF/4KaUPycf00WltUiTeOeYCuXY3kZKfQakuncV /SMTyG83pJ0UjEEsoZB5Ualr+BdGMQI1fe6jg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:from:subject:cc:to:message-id:user-agent :date; bh=hRMart1iNsOfZ4XtJXaVBFmcLibgJ1Ww0Q9rcJYqncQ=; b=JVFs1bfckXuLMyggNAE4yY2NsRMWuFobKn6yXLavlgycH/R0AogkKAYEBFLeyv2kXw JDFbFiLSRSb50h3AcZtZxmn3BOnFJjFnFKQHJO/hUbNQv/UL/90RRPkfxa3wdnfErsgG ExWQtrcrsYVVqe1IJAODOeRSLg5BXAE2ZaPexEQY7MZx0n/mAZUpoUGfRurR/GOnmwmo rkYeQzs8nJHVl65QO8OTyblGMMCEXycf9jhJsFMMwEMsqvYANcEl7dkShPuJIz52Y0sL 4yLGeK7pPMghD5qgnipEUDi7oCj8UPr8EeIYxU2cSqDJnqoor3U+7XQ60QXTYxH0VfKQ iMgQ== X-Gm-Message-State: APjAAAVrQjMLaUpIBmHVj9RtkK60LKBaDvIY+ZEOumuW43B5CFp6osKV ehdlg7RVMcOWg47W7Iv5dsrovQ== X-Received: by 2002:a62:6341:: with SMTP id x62mr18776769pfb.63.1557548917910; Fri, 10 May 2019 21:28:37 -0700 (PDT) Received: from localhost ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id s19sm8637374pfe.74.2019.05.10.21.28.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 May 2019 21:28:37 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <36fab640-b98e-9781-f96f-0ed988a71077@rasmusvillemoes.dk> References: <20190507045433.542-1-hsinyi@chromium.org> <36fab640-b98e-9781-f96f-0ed988a71077@rasmusvillemoes.dk> From: Stephen Boyd Subject: Re: [PATCH] arm64: add support for rng-seed Cc: "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Mark Rutland , Catalin Marinas , Will Deacon , Frank Rowand , Andrew Morton , Mike Rapoport , Michal Hocko , Ard Biesheuvel , James Morse , Andrew Murray , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Architecture Mailman List , Kees Cook To: Hsin-Yi Wang , Rasmus Villemoes , Rob Herring Message-ID: <155754891575.14659.7326257870940088515@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 Date: Fri, 10 May 2019 21:28:35 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Rasmus Villemoes (2019-05-09 23:14:00) >=20 > So, why not just have the bootloader add whatever entropy it has via the > commandline, which already gets mixed in? That requires no kernel > changes, and works for all architectures. >=20 > If anything, perhaps instead of just adding gobbledygook=3Dabc123, make an > official command line parameter (there was talk about this at some > point), and have the kernel overwrite the value with xxx so it's not > visible in /proc/cmdline. >=20 Why is using the commandline desired? Just for ease of implementation and cross-architecture support because we already mix in the commandline?=20 The kernel commandline is limited in size so we would waste around 64-bytes of the buffer to get a random chunk of data from the bootloader into the kernel instead of allowing more parameters. Or if we wanted a large chunk of random bytes then we would start running into the length limit. Given that EFI based systems already have a way to inject more randomness into the kernel's RNG very early by means of an RNG seed EFI protocol it looks irrelevant to want to be cross-architecture in this way because EFI platforms wouldn't use it.=20 If DT based systems can all get support for this in the generic DT code then we're able to make things work on both EFI and DT platforms with a little extra __init code while keeping things away from the commandline. That sounds like a win to me because the commandline is limited in size and meant to pass things like parameters and flags to the kernel, not raw data like seeds and binary gook.