[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5cdda17d.1c69fb81.8e244.683a@mx.google.com>
Date: Thu, 16 May 2019 10:44:28 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Hsin-Yi Wang <hsinyi@...omium.org>,
James Morse <james.morse@....com>
Cc: Rob Herring <robh+dt@...nel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>, devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Frank Rowand <frowand.list@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Miles Chen <miles.chen@...iatek.com>,
Andrew Murray <andrew.murray@....com>,
Mark Rutland <mark.rutland@....com>,
Jun Yao <yaojun8558363@...il.com>, Yu Zhao <yuzhao@...gle.com>,
Robin Murphy <robin.murphy@....com>,
Laura Abbott <labbott@...hat.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v3 2/3] arm64: implement update_fdt_pgprot()
Quoting James Morse (2019-05-16 10:34:16)
> Hi!
>
> On 16/05/2019 17:48, Hsin-Yi Wang wrote:
> > On Thu, May 16, 2019 at 11:32 PM Rob Herring <robh+dt@...nel.org> 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!
>
Doesn't it need to be done in two places? Userspace and also in the
kernel when kexec_file_load() is used? At least, I see a bit of code
that does kaslr seed updates to the copied dtb in setup_dtb() of
arch/arm64/kernel/machine_kexec_file.c that probably needs to get an
update for this new property too.
Powered by blists - more mailing lists