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=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 7B23DC04AAF for ; Thu, 16 May 2019 17:34:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42A392082E for ; Thu, 16 May 2019 17:34:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728818AbfEPReY (ORCPT ); Thu, 16 May 2019 13:34:24 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52984 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbfEPReY (ORCPT ); Thu, 16 May 2019 13:34:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4CC4419BF; Thu, 16 May 2019 10:34:23 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 073003F5AF; Thu, 16 May 2019 10:34:19 -0700 (PDT) Subject: Re: [PATCH v3 2/3] arm64: implement update_fdt_pgprot() To: Hsin-Yi Wang Cc: Rob Herring , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Frank Rowand , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , Ard Biesheuvel , Miles Chen , Andrew Murray , Mark Rutland , Jun Yao , Yu Zhao , Robin Murphy , Laura Abbott , Stephen Boyd , Kees Cook References: <20190516102817.188519-1-hsinyi@chromium.org> <20190516102817.188519-2-hsinyi@chromium.org> From: James Morse Message-ID: <5f598806-1c36-7c2a-0f47-da79ec7d28c6@arm.com> Date: Thu, 16 May 2019 18:34:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On 16/05/2019 17:48, Hsin-Yi Wang wrote: > On Thu, May 16, 2019 at 11:32 PM Rob Herring wrote: >> Doesn't kexec operate on a copy because it already does modifications. It does! > This patch is to assist "[PATCH v3 3/3] fdt: add support for rng-seed" > (https://lkml.org/lkml/2019/5/16/257). I thought that by default > second kernel would use original fdt, so I write new seed back to > original fdt. Might be wrong. > > ** "[PATCH v3 3/3] fdt: add support for rng-seed" is supposed to > handle for adding new seed in kexec case, discussed in v2 > (https://lkml.org/lkml/2019/5/13/425) > > By default (not considering user defines their own fdt), if second > kernel uses copied fdt, when is it copied and can we modify that? Regular kexec's user-space already updates the dtb for the cmdline and maybe the initrd. For KASLR, it generates its own seed with getrandom(): https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/tree/kexec/arch/arm64/kexec-arm64.c#n483 If user-space can do it, user-space should do it! Thanks, James