Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp862185yba; Thu, 16 May 2019 10:03:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZ9W+u6g+PkZk/n4bqHntdaIvDM4dvpKAWD3oCXtQV+tHsFs8+5hNSYtNPiG7BTvGStka6 X-Received: by 2002:a63:2325:: with SMTP id j37mr51307405pgj.137.1558026211771; Thu, 16 May 2019 10:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558026211; cv=none; d=google.com; s=arc-20160816; b=gQqOsjEBXJBcNnyAkJXf5NRTvwexiJ8NTNn4eD2KNJ8ne0QLkk5aUysuyxx2pGhVyg JU4KjxrbkgFhYEUWb0dleaotJF/5XbwED1tSQhZjEgQrhG5jjKvKwvSt+nCU1HEG5dRq kDSJ83Bpj+oGKvwd91eUdlTzJ/7EzlfDitH689SYGIKbEi7v1O8fGjYsReBxhRKk15sY TZshKZb1u4miHlWpyK6l4GuRnyDQOMArs+dLKt39cbqv17I5X+JRX+e9luISiXRg+q8A Wz5XWYBuNGRonvYas+4jjYcP5+/hXgdMrx70I1cuJ3BRerZYbaX+/3VbTOw8un9CN8wl tBsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=PHR0hYYEwPULziU46CMKQKc5SNs9O4WaI8hYyRJBMJY=; b=Wx8dVUoISe+aku4HuYcVIYqyO9C61P0qv9FyyxhSZlLNvgjh5PYYoXB4Mj+na8QAkP 9p5A+kgsGd1kOoZcmP8xUc6dcoYCvvUZWEMuNPdFNDBYUyLJAFP656A2Y6UUf3dcGcWa JgVz4cOUS96hIBImgfGRDXmLQhbNzRIaGJgCHVn4XYRAuqlFMSq84u/TvzptV0edJ/FY cDG+1Q6SMlYGMHU5uG6NOQ4VRoszS/P4cwXaEWhdgaF1ioWGw+YYV7cyDDcb1AfDlI1u /MA8ajl3dPkSLLDI/mOll0JLzJm365mTOv+tyaZaDQFUjwq/4avWI403EY12NdBM/uoN cqMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tmUl4rNa; 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 i97si5550596plb.173.2019.05.16.10.03.16; Thu, 16 May 2019 10:03:31 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tmUl4rNa; 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 S1727424AbfEPPkI (ORCPT + 99 others); Thu, 16 May 2019 11:40:08 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55062 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbfEPPkH (ORCPT ); Thu, 16 May 2019 11:40:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PHR0hYYEwPULziU46CMKQKc5SNs9O4WaI8hYyRJBMJY=; b=tmUl4rNa0e8kPfHmpmAiiRHx9 ps9QR8Gt8+nO7MO7sYMHwLW55WTc+VdHPlZ+LRyA1BWJ1riXwNU92+JHINbtKi2D69twAz2g5e+rR Uv8ts+rT6CMJ9etGQROToSbN5J52CipEuy4FI2bBfgebVRU4G+dyi5iwld2dOFD4vMScfS59smfuW THcVKoDjdW3iyJ8Sj52mDoRi/zM1QNJJ+h0ay07z7qz3YWT6oMjSpCycObIQImYBrBpZafTJg/F6S R+TukXMxw63UBohzqSeg+nwhn9Ev7S3vTibExMt4CWLx511oULO+eEwcrF32NMmVlHW6PkGOyfYTE VPg0uqBTA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRIUA-0007tb-37; Thu, 16 May 2019 15:39:58 +0000 Subject: Re: [PATCH v3 3/3] fdt: add support for rng-seed To: Hsin-Yi Wang , linux-arm-kernel@lists.infradead.org Cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Rowand , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , Ard Biesheuvel , Miles Chen , James Morse , Andrew Murray , Mark Rutland , Chintan Pandya , Jun Yao , Yu Zhao , Robin Murphy , Laura Abbott , Stephen Boyd , Kees Cook References: <20190516102817.188519-1-hsinyi@chromium.org> <20190516102817.188519-3-hsinyi@chromium.org> From: Randy Dunlap Message-ID: <932a02f2-a1d3-a8d7-c7a4-2891024d10a2@infradead.org> Date: Thu, 16 May 2019 08:39:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190516102817.188519-3-hsinyi@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/16/19 3:28 AM, Hsin-Yi Wang wrote: > Introducing a chosen node, rng-seed, which is an entropy that can be > passed to kernel called very early to increase initial device > randomness. Bootloader should provide this entropy and the value is > read from /chosen/rng-seed in DT. > > Signed-off-by: Hsin-Yi Wang > --- > change v2->v3: > 1. use arch hook for fdt pgprot change > 2. handle CONFIG_KEXEC > --- > Documentation/devicetree/bindings/chosen.txt | 14 +++++ > drivers/of/fdt.c | 55 ++++++++++++++++++++ > 2 files changed, 69 insertions(+) > > diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt > index 45e79172a646..fef5c82672dc 100644 > --- a/Documentation/devicetree/bindings/chosen.txt > +++ b/Documentation/devicetree/bindings/chosen.txt > @@ -28,6 +28,20 @@ mode) when EFI_RNG_PROTOCOL is supported, it will be overwritten by > the Linux EFI stub (which will populate the property itself, using > EFI_RNG_PROTOCOL). > > +rng-seed > +----------- > + > +This property served as an entropy to add device randomness. It is parsed serves > +as a byte array, e.g. > + > +/ { > + chosen { > + rng-seed = <0x31 0x95 0x1b 0x3c 0xc9 0xfa 0xb3 ...>; > + }; > +}; > + > +This random value should be provided by bootloader. > + > stdout-path > ----------- > -- ~Randy