Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3206772ybd; Fri, 28 Jun 2019 04:48:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxAiiEd1tDgh6sufrcBs47499PxualP7pHT98CdiVeilfE5E7mJ9EiqcPoBiSSm551s5Vh X-Received: by 2002:a17:902:a9ca:: with SMTP id b10mr6934532plr.69.1561722494685; Fri, 28 Jun 2019 04:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561722494; cv=none; d=google.com; s=arc-20160816; b=YM0IEk+pTWupoVCWWjyUG6/wBuqzucWmLi8+dzKZqr0Mux8HPY7YoDLPRUntvMrBZf K2Cvfb4n0ParmFqiGUABoCtfn8Lg/QrpF3vkAwXu6HANIzFyIz/s323pLwCVG6nQJLy2 VLp5wV7rpguNjZ7gQmZbqBxRzCqeIRWvbLnFGgX2vp/6uLcUkpEVchenl1j+uctNNys7 9IGhXPRMrGR/dwlemQveHL+TiimPUMCkw2kSnueKrSUWBP4C5ZXVRaY+AMuMtYU0sr+1 kHMhr3wGHMZfm/05COH/WYAvX2SXLyQynPhS0WnMpNajHcwBXHTA/UAy+fjg7KpSKZGv pWOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hnrNJm+YPQ9P/zBeIY5Q0s4HopjViLSRE1ga8Evn3gQ=; b=P4GvLHRDKR6fQV+7lyphGAYo2ARhRn97OBuAeSFwtkJgy61aaDE7gHgoqMKdsnulhi jHxD/CRg0IcvwtvImrpAA8s0VjXp2SFKHgeSCzb+k6t7MG6woQ2TkHlIeFnvAcdS0xDH ezGN2YoSvClfW3LQ/0HkRXQJ789RXe+5XFC4fadG3zRBeQquxAH4/q4e0aDjkACy5BJK zExwINyGiwPG7TtNzkWl4TSnzhSpdkmbJeWx5xwGi7zm3gz0RE6a0sMX92Elpq1MI7QV L0zvJ/lHl21bR7bEyTegD88d2TnqCWKU09MlY1TxybeFhdsAffUcN1JOo0NB6Op4Zf/6 h4Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nAdwaoFQ; 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 a24si2127539pju.32.2019.06.28.04.47.58; Fri, 28 Jun 2019 04:48:14 -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=nAdwaoFQ; 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 S1726723AbfF1Lrr (ORCPT + 99 others); Fri, 28 Jun 2019 07:47:47 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:39553 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbfF1Lrr (ORCPT ); Fri, 28 Jun 2019 07:47:47 -0400 Received: by mail-qk1-f193.google.com with SMTP id i125so4487653qkd.6 for ; Fri, 28 Jun 2019 04:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hnrNJm+YPQ9P/zBeIY5Q0s4HopjViLSRE1ga8Evn3gQ=; b=nAdwaoFQWMK/thL2OEH/rLDCYdBnzoQTtEM6UcrKBEmJQKF6ko515Bi6qtrIdXDt15 ixrnyV55XUQ08KxuoymqWCYvAquA66hzFuvBfNRqZUrp4+6Yn8YXtiAOaHTcEAIP6I29 0kgKXVjJNGQvg7lzEJnk75HtFdgoa1aD+8i7o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hnrNJm+YPQ9P/zBeIY5Q0s4HopjViLSRE1ga8Evn3gQ=; b=kORhqa7iypev6oQxRt7inhqcN/6zLG0i2WmvQVpo3XR7Pz18HULZicBZosb82yaLsi zDkK3/kpWANCjyI/gxuRRDDLbxvXHBpGsDtwVy3IiuVr6ppI1W0dEi2Sk0NHf8GWhzjp PauRQ3qCxMPMUTxYoYJZ3LjRlevij/k/UFCyFwn3sBU2C2YTKBiKoL5ve996xtsSnEn9 zKnarxX8o7LBw+Hj6epFZWy5S+GL6Cc8O5/yBYmKLizEEmbr863d5DxrnkSQWJh3Qy9c ylxBYOiZ4ucGKYXgmCWsMA4eMYLuG6furx8ga1J/9Z0NpKxUx7wvm2oR06c9SDay3vy9 omhw== X-Gm-Message-State: APjAAAWSQdc+0wAnZin3/UKSIcyjODcWFJI3GiL8K89xzjtxH/rj3o1q UT0wn39w+0BDGIFeJbHmWYDB7/EW3yDfVi29Ea8BPQ== X-Received: by 2002:a37:9e4b:: with SMTP id h72mr8236923qke.297.1561722466499; Fri, 28 Jun 2019 04:47:46 -0700 (PDT) MIME-Version: 1.0 References: <20190612043258.166048-1-hsinyi@chromium.org> <20190612043258.166048-4-hsinyi@chromium.org> <20190628094251.GC36437@lakrids.cambridge.arm.com> In-Reply-To: <20190628094251.GC36437@lakrids.cambridge.arm.com> From: Hsin-Yi Wang Date: Fri, 28 Jun 2019 19:47:20 +0800 Message-ID: Subject: Re: [PATCH v6 3/3] arm64: kexec_file: add rng-seed support To: Mark Rutland Cc: "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Rob Herring , devicetree@vger.kernel.org, lkml , Frank Rowand , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , Ard Biesheuvel , Miles Chen , James Morse , Andrew Murray , Jun Yao , Yu Zhao , Robin Murphy , Laura Abbott , Stephen Boyd , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 5:42 PM Mark Rutland wrote: > > On Wed, Jun 12, 2019 at 12:33:02PM +0800, Hsin-Yi Wang wrote: > > Adding "rng-seed" to dtb. It's fine to add this property if original > > fdt doesn't contain it. Since original seed will be wiped after > > read, so use a default size 128 bytes here. > > Why is 128 bytes the default value? More than 64 bytes should be enough. > > I didn't see an update to Documentation/devicetree/bindings/chosen.txt, > so it's not clear to me precisely what we expect. > Rob suggested to update in a newer dt-schema documentation at https://github.com/devicetree-org/dt-schema. A pull request has been sent but perhaps it would continue if kernel patches are accepted. > > For 128 bytes, it would be better to use a buffer on the stack. That > avoids the possibility of the allocation failing. > Okay, I'll update this. > > If the RNG wasn't initialised, we'd carry on with a warning. Why do we > follow a different policy here? > For failure case, I think kernel can still be boot since this is not a very fatal case, just same as the seed wasn't provided by bootloader at first boot. So I'll also let fdt_setprop() failed case carry on with warning. Thanks