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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 98D95C3A59F for ; Thu, 29 Aug 2019 15:47:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C6C321726 for ; Thu, 29 Aug 2019 15:47:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Hj8S+jhV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C6C321726 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mit.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mMuOnCohfUjCFyo9oPOd7dIO2Tth9203+oaUNnGx05Q=; b=Hj8S+jhVx3et14 G7e7KBPS6ad3BHhqj9w8TvaX7zAT278zaRlcFvHspQtNgaTAyqvZwPiTnaO0OOiQNXZrDNnuzV+mV RC9D0YOEImBwAVanehX5jyndSKMuQT4DEnxKavSY0ljz3on96V7PFZyDLUolYfTVcJtzTFeyWSVK/ BmqbXSFlRlwHLkFRTi7Qi5ho06fnnT3aB0m31w47ZnBAM6tbDkwAwmGYnqIhv5FW8HivxDhk/mCrb zAaaBzHPf1dxmovUqyTRiDOpn0joYFL1Z59+jiZLIRHK2fuBG3ny/3TOxUhwEKHZ0zVj+LCxBzy54 96Pg/SlyOMCLm1IbDeHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i3MdZ-0000zT-Sh; Thu, 29 Aug 2019 15:47:01 +0000 Received: from outgoing-auth-1.mit.edu ([18.9.28.11] helo=outgoing.mit.edu) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i3MdU-0000vv-RQ for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2019 15:46:58 +0000 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (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 x7TFj59e005976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Aug 2019 11:45:07 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 3F15242049E; Thu, 29 Aug 2019 11:45:05 -0400 (EDT) Date: Thu, 29 Aug 2019 11:45:05 -0400 From: "Theodore Y. Ts'o" To: Hsin-Yi Wang Subject: Re: [PATCH v9 2/3] fdt: add support for rng-seed Message-ID: <20190829154505.GB10779@mit.edu> Mail-Followup-To: "Theodore Y. Ts'o" , Hsin-Yi Wang , Kees Cook , Stephen Boyd , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Russell King , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , "Paul E . McKenney" , Kate Stewart , "David S . Miller" , Viresh Kumar , Marek Szyprowski , Arnd Bergmann , Marc Zyngier , Julien Thierry , Greg Kroah-Hartman , Wei Li , Anders Roxell , Rob Herring , Aaro Koskinen , Daniel Thompson , Tim Chen , Rik van Riel , Waiman Long , Marcelo Tosatti , Peter Zijlstra , Armijn Hemel , Grzegorz Halat , Len Brown , Shaokun Zhang , Mike Rapoport , Guenter Roeck , Andrew Morton , Mathieu Desnoyers , Alexey Dobriyan , Yury Norov , Josh Poimboeuf , Jiri Kosina , Mukesh Ojha , lkml References: <20190822071522.143986-1-hsinyi@chromium.org> <20190822071522.143986-3-hsinyi@chromium.org> <5d5ed368.1c69fb81.419fc.0803@mx.google.com> <201908241203.92CC0BE8@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190829_084657_125271_CF31BE62 X-CRM114-Status: GOOD ( 17.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kate Stewart , Peter Zijlstra , Catalin Marinas , Mukesh Ojha , Grzegorz Halat , "H . Peter Anvin" , Guenter Roeck , Will Deacon , Marek Szyprowski , Rob Herring , Daniel Thompson , Anders Roxell , Yury Norov , Marc Zyngier , Russell King , Aaro Koskinen , Ingo Molnar , Viresh Kumar , Waiman Long , "Paul E . McKenney" , Wei Li , Alexey Dobriyan , Julien Thierry , Len Brown , Kees Cook , Arnd Bergmann , Rik van Riel , Stephen Boyd , Shaokun Zhang , Mike Rapoport , Borislav Petkov , Josh Poimboeuf , Thomas Gleixner , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Greg Kroah-Hartman , Marcelo Tosatti , lkml , Armijn Hemel , Jiri Kosina , Mathieu Desnoyers , Andrew Morton , Tim Chen , "David S . Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 29, 2019 at 06:03:57PM +0800, Hsin-Yi Wang wrote: > On Thu, Aug 29, 2019 at 1:36 AM Kees Cook wrote: > > > > Can this please be a boot param (with the default controlled by the > > CONFIG)? See how CONFIG_RANDOM_TRUST_CPU is wired up... > > > > Currently rng-seed read and added in setup_arch() --> > setup_machine_fdt().. -> early_init_dt_scan_chosen(), which is earlier > than parse_early_param() that initializes early_param. > > If we want to set it as a boot param, add_bootloader_randomness() can > only be called after parse_early_param(). The seed can't be directly > added to pool after it's read in. We need to store into global > variable and load it later. > If this seems okay then I'll add a patch for this. Thanks I thought about asking for this, but we really want to do this as early as possible, so that it can be used by KASLR and other services that are run super early. Also, whether or not we can trust the bootloader is going to be a system-level thing. This should probably be defaulted to off, and only enabled by the system integrator if they are 100%, positively sure, that the entire system is one where we can trust the source of randomness which the bootloader is using --- or for that matter, that the bootloader is trustworthy! Is it really going to be that useful for a random system administrator to be able to flip this on or off from the command line? Hopefully there will be an easy way to configure the firmware or the bootloader to simply not supply entropy, if for some reason it's not trustworthy. - Ted _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel