From: Mark Rutland <mark.rutland@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Geoff Levand <geoff@infradead.org>,
Catalin Marinas <Catalin.Marinas@arm.com>,
Will Deacon <Will.Deacon@arm.com>,
Leif Lindholm <leif.lindholm@linaro.org>,
Marc Zyngier <Marc.Zyngier@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
Dave Young <dyoung@redhat.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>
Subject: Re: [PATCH 00/10] arm64 kexec kernel patches V5
Date: Fri, 7 Nov 2014 11:35:18 +0000 [thread overview]
Message-ID: <20141107113517.GE4585@leverpostej> (raw)
In-Reply-To: <CAKv+Gu9kJ6GHcPm9fa6m84gse9DQat6D54zFD0G0X9od=sYVpw@mail.gmail.com>
On Fri, Nov 07, 2014 at 10:41:11AM +0000, Ard Biesheuvel wrote:
> On 7 November 2014 11:16, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Fri, Nov 07, 2014 at 12:41:45AM +0000, Grant Likely wrote:
> >> On Thu, Nov 6, 2014 at 3:08 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> >> > On Thu, Nov 06, 2014 at 01:56:42AM +0000, Dave Young wrote:
> >> >> On 11/03/14 at 07:46pm, Mark Rutland wrote:
> >> >> > On Fri, Oct 31, 2014 at 07:52:09AM +0000, Dave Young wrote:
> >> >> > > Hi Geoff
> >> >> > >
> >> >> > > I tested your patches. The macihne is using spin-table cpu enable method
> >> >> > > so I tried maxcpus=1 as you suggested.
> >> >> > >
> >> >> > > There's below issues for me, thoughts?
> >> >> > >
> >> >> > > 1. For acpi booting there's no /proc/device-tree so kexec can not find dtb
> >> >> > > to use.
> >> >> >
> >> >> > Are you absolutely certain of this?
> >> >> >
> >> >> > To use ACPI, you must have booted via EFI, as the only mechanism for
> >> >> > finding the ACPI tables is via EFI. If booted via EFI, the stub will
> >> >> > have created a stub DTB if there is no provided DTB, to pass the command
> >> >> > line and pointers to EFI data structures. This stub DTB should be
> >> >> > present in the usual place.
> >> >>
> >> >> Mark, I used kexec-tools from Geoff's git tree, it will create dtb from procfs
> >> >> maybe I can pass external dtb to kexec-tools. What you mentioned should be true
> >> >> though but I have not get idea how to get the dtb which kernel is using for boot
> >> >> since it is not unflattened.
> >> >
> >> > Ah, sorry. I see the problem now. For ACPI you don't unflatten the tree,
> >> > so there's nothing to expose at in sysfs/procfs.
> >> >
> >> > Somehow we need to unflatten the DTB without exposing it to drivers,
> >> > such that it can be exposed to userspace in the usual place but drivers
> >> > don't being probing based off of it.
> >>
> >> Is that even necessary? If the tree isn't unflattened, then it is just
> >> a stub tree. There really isn't anything interesting in it.
> >
> > We need to UEFI properties [1] from /chosen to access the memory map and
> > system table (both of which are necessary to access any ACPI tables).
> >
> >> Kexec should recreate the tree from scratch in that case.
> >
> > I'm not sure if the required information is exposed to userspace
> > elsewhere. Ard, Leif?
> >
>
> Personally, I think we should not be using /proc/device-tree at all,
> but instead retain the original blob in some way and expose that.
Grant took objection to that approach previously.
> We already have /sys/firmware/efi/systab which contains the physical
> addresses of the UEFI configuration tables. We should probably add an
> entry for the FDT there anyway, but we would still be looking at
> mmap(/dev/mem) to access it, which is not a practice we want to
> encourage, I suppose.
We should not encourage use of /dev/mem.
Using /sys/firmware/efi/systab doesn't get us the memory map though,
unless that's also exposed?
> Also, we *must* take the secure boot scenario into account. Booting
> with an arbitrary user generated DTB is nice, but if you are doing
> kexec without an initrd, for instance, it would also be nice if we
> could just reuse the existing DTB without bothering the user for it at
> all, which would be something we could also allow when running
> securely.
Secure boot has to be handled completely differently. That will require
new syscall support, in-kernel purgatory, and so on.
That should not affect the non-secureboot cases where a user wants to
load their own DTB (or other objects) into memory for the next OS (which
might not be Linux).
Mark.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/10] arm64 kexec kernel patches V5
Date: Fri, 7 Nov 2014 11:35:18 +0000 [thread overview]
Message-ID: <20141107113517.GE4585@leverpostej> (raw)
In-Reply-To: <CAKv+Gu9kJ6GHcPm9fa6m84gse9DQat6D54zFD0G0X9od=sYVpw@mail.gmail.com>
On Fri, Nov 07, 2014 at 10:41:11AM +0000, Ard Biesheuvel wrote:
> On 7 November 2014 11:16, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Fri, Nov 07, 2014 at 12:41:45AM +0000, Grant Likely wrote:
> >> On Thu, Nov 6, 2014 at 3:08 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> >> > On Thu, Nov 06, 2014 at 01:56:42AM +0000, Dave Young wrote:
> >> >> On 11/03/14 at 07:46pm, Mark Rutland wrote:
> >> >> > On Fri, Oct 31, 2014 at 07:52:09AM +0000, Dave Young wrote:
> >> >> > > Hi Geoff
> >> >> > >
> >> >> > > I tested your patches. The macihne is using spin-table cpu enable method
> >> >> > > so I tried maxcpus=1 as you suggested.
> >> >> > >
> >> >> > > There's below issues for me, thoughts?
> >> >> > >
> >> >> > > 1. For acpi booting there's no /proc/device-tree so kexec can not find dtb
> >> >> > > to use.
> >> >> >
> >> >> > Are you absolutely certain of this?
> >> >> >
> >> >> > To use ACPI, you must have booted via EFI, as the only mechanism for
> >> >> > finding the ACPI tables is via EFI. If booted via EFI, the stub will
> >> >> > have created a stub DTB if there is no provided DTB, to pass the command
> >> >> > line and pointers to EFI data structures. This stub DTB should be
> >> >> > present in the usual place.
> >> >>
> >> >> Mark, I used kexec-tools from Geoff's git tree, it will create dtb from procfs
> >> >> maybe I can pass external dtb to kexec-tools. What you mentioned should be true
> >> >> though but I have not get idea how to get the dtb which kernel is using for boot
> >> >> since it is not unflattened.
> >> >
> >> > Ah, sorry. I see the problem now. For ACPI you don't unflatten the tree,
> >> > so there's nothing to expose at in sysfs/procfs.
> >> >
> >> > Somehow we need to unflatten the DTB without exposing it to drivers,
> >> > such that it can be exposed to userspace in the usual place but drivers
> >> > don't being probing based off of it.
> >>
> >> Is that even necessary? If the tree isn't unflattened, then it is just
> >> a stub tree. There really isn't anything interesting in it.
> >
> > We need to UEFI properties [1] from /chosen to access the memory map and
> > system table (both of which are necessary to access any ACPI tables).
> >
> >> Kexec should recreate the tree from scratch in that case.
> >
> > I'm not sure if the required information is exposed to userspace
> > elsewhere. Ard, Leif?
> >
>
> Personally, I think we should not be using /proc/device-tree at all,
> but instead retain the original blob in some way and expose that.
Grant took objection to that approach previously.
> We already have /sys/firmware/efi/systab which contains the physical
> addresses of the UEFI configuration tables. We should probably add an
> entry for the FDT there anyway, but we would still be looking at
> mmap(/dev/mem) to access it, which is not a practice we want to
> encourage, I suppose.
We should not encourage use of /dev/mem.
Using /sys/firmware/efi/systab doesn't get us the memory map though,
unless that's also exposed?
> Also, we *must* take the secure boot scenario into account. Booting
> with an arbitrary user generated DTB is nice, but if you are doing
> kexec without an initrd, for instance, it would also be nice if we
> could just reuse the existing DTB without bothering the user for it at
> all, which would be something we could also allow when running
> securely.
Secure boot has to be handled completely differently. That will require
new syscall support, in-kernel purgatory, and so on.
That should not affect the non-secureboot cases where a user wants to
load their own DTB (or other objects) into memory for the next OS (which
might not be Linux).
Mark.
next prev parent reply other threads:[~2014-11-07 11:35 UTC|newest]
Thread overview: 141+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 23:10 [PATCH 00/10] arm64 kexec kernel patches V5 Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 05/10] arm64: Convert dts to use reserved-memory nodes Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-24 10:51 ` Mark Rutland
2014-10-24 10:51 ` Mark Rutland
2014-10-24 10:59 ` Grant Likely
2014-10-24 10:59 ` Grant Likely
2014-10-24 12:27 ` Mark Rutland
2014-10-24 12:27 ` Mark Rutland
2014-10-24 14:45 ` Grant Likely
2014-10-24 14:45 ` Grant Likely
2014-10-31 23:44 ` Geoff Levand
2014-10-31 23:44 ` Geoff Levand
2014-11-03 20:02 ` Mark Rutland
2014-11-03 20:02 ` Mark Rutland
2014-11-03 22:26 ` Rob Herring
2014-11-03 22:26 ` Rob Herring
2014-11-04 11:35 ` Mark Rutland
2014-11-04 11:35 ` Mark Rutland
2014-11-04 11:37 ` Grant Likely
2014-11-04 11:37 ` Grant Likely
2014-10-23 23:10 ` [PATCH 08/10] arm64/kexec: Add core kexec support Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-24 10:28 ` Mark Rutland
2014-10-24 10:28 ` Mark Rutland
2014-11-13 2:19 ` Geoff Levand
2014-11-13 2:19 ` Geoff Levand
2014-11-17 16:38 ` Mark Rutland
2014-11-17 16:38 ` Mark Rutland
2014-11-17 20:20 ` Geoff Levand
2014-11-17 20:20 ` Geoff Levand
2014-11-07 11:01 ` Arun Chandran
2014-11-07 11:01 ` Arun Chandran
2014-11-12 21:54 ` Geoff Levand
2014-11-13 9:52 ` Arun Chandran
2014-11-17 3:52 ` Dave Young
2014-10-23 23:10 ` [PATCH 03/10] arm64: Add new hcall HVC_CALL_FUNC Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 07/10] arm64: Move proc-macros.S to include/asm Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 06/10] arm64: Update booting.txt to reserved-memory nodes Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-24 10:54 ` Mark Rutland
2014-10-24 10:54 ` Mark Rutland
2014-10-24 11:04 ` Grant Likely
2014-10-24 11:04 ` Grant Likely
2014-10-24 12:18 ` Mark Rutland
2014-10-24 12:18 ` Mark Rutland
2014-10-24 13:54 ` Grant Likely
2014-10-24 13:54 ` Grant Likely
2014-10-24 14:10 ` Mark Rutland
2014-10-24 14:10 ` Mark Rutland
2014-10-24 14:47 ` Grant Likely
2014-10-24 14:47 ` Grant Likely
2014-10-23 23:10 ` [PATCH 02/10] arm64: Convert hcalls to use ISS field Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 04/10] arm64: Add EL2 switch to soft_restart Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-24 10:57 ` Mark Rutland
2014-10-24 10:57 ` Mark Rutland
2014-10-31 23:47 ` Geoff Levand
2014-10-31 23:47 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 01/10] arm64/kvm: Fix assembler compatibility of macros Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-24 9:24 ` Mark Rutland
2014-10-24 9:24 ` Mark Rutland
2014-10-27 12:13 ` Will Deacon
2014-10-27 12:13 ` Will Deacon
2014-10-27 12:45 ` Christoffer Dall
2014-10-27 12:45 ` Christoffer Dall
2014-10-31 23:06 ` [PATCH V2 " Geoff Levand
2014-10-31 23:06 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 09/10] arm64/kexec: Enable kexec in the arm64 defconfig Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-24 10:31 ` Mark Rutland
2014-10-24 10:31 ` Mark Rutland
2014-10-31 23:50 ` Geoff Levand
2014-10-31 23:50 ` Geoff Levand
2014-11-03 20:05 ` Mark Rutland
2014-11-03 20:05 ` Mark Rutland
2014-11-04 1:49 ` Geoff Levand
2014-11-04 1:49 ` Geoff Levand
2014-10-23 23:10 ` [PATCH 10/10] arm64/kexec: Add pr_devel output Geoff Levand
2014-10-23 23:10 ` Geoff Levand
2014-10-31 7:52 ` [PATCH 00/10] arm64 kexec kernel patches V5 Dave Young
2014-10-31 7:52 ` Dave Young
2014-10-31 23:25 ` Geoff Levand
2014-10-31 23:25 ` Geoff Levand
2014-11-06 2:01 ` Dave Young
2014-11-06 2:01 ` Dave Young
2014-11-13 8:37 ` Dave Young
2014-11-13 8:37 ` Dave Young
2014-11-13 23:50 ` Geoff Levand
2014-11-13 23:50 ` Geoff Levand
2014-11-17 3:49 ` Dave Young
2014-11-17 3:49 ` Dave Young
2014-11-03 19:46 ` Mark Rutland
2014-11-03 19:46 ` Mark Rutland
2014-11-06 1:56 ` Dave Young
2014-11-06 1:56 ` Dave Young
2014-11-06 15:08 ` Mark Rutland
2014-11-06 15:08 ` Mark Rutland
2014-11-07 0:41 ` Grant Likely
2014-11-07 0:41 ` Grant Likely
2014-11-07 10:16 ` Mark Rutland
2014-11-07 10:16 ` Mark Rutland
2014-11-07 10:41 ` Ard Biesheuvel
2014-11-07 10:41 ` Ard Biesheuvel
2014-11-07 10:45 ` Ard Biesheuvel
2014-11-07 10:45 ` Ard Biesheuvel
2014-11-07 10:46 ` Ard Biesheuvel
2014-11-07 10:46 ` Ard Biesheuvel
2014-11-07 11:35 ` Mark Rutland [this message]
2014-11-07 11:35 ` Mark Rutland
2014-11-07 11:42 ` Ard Biesheuvel
2014-11-07 11:42 ` Ard Biesheuvel
2014-11-07 22:34 ` Grant Likely
2014-11-07 22:34 ` Grant Likely
2014-11-06 12:16 ` Arun Chandran
2014-11-06 12:16 ` Arun Chandran
2014-11-06 15:28 ` Mark Rutland
2014-11-06 15:28 ` Mark Rutland
2014-11-06 16:13 ` Arun Chandran
2014-11-06 16:13 ` Arun Chandran
2014-11-06 18:25 ` Geoff Levand
2014-11-06 18:25 ` Geoff Levand
2014-11-07 6:26 ` Arun Chandran
2014-11-07 6:26 ` Arun Chandran
2014-11-06 18:39 ` Mark Rutland
2014-11-06 18:39 ` Mark Rutland
2014-11-07 6:36 ` Arun Chandran
2014-11-07 6:36 ` Arun Chandran
2014-11-10 7:17 ` Dave Young
2014-11-10 7:17 ` Dave Young
2014-11-10 8:35 ` Arun Chandran
2014-11-10 8:35 ` Arun Chandran
2014-11-10 9:24 ` Dave Young
2014-11-10 9:24 ` Dave Young
2014-11-12 9:56 ` Dave Young
2014-11-12 9:56 ` Dave Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141107113517.GE4585@leverpostej \
--to=mark.rutland@arm.com \
--cc=Catalin.Marinas@arm.com \
--cc=Marc.Zyngier@arm.com \
--cc=Will.Deacon@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=dyoung@redhat.com \
--cc=geoff@infradead.org \
--cc=grant.likely@linaro.org \
--cc=kexec@lists.infradead.org \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.