Evidently I've managed to overlap the EBBR monthly with the 96Boards SC monthly meeting. Does anyone object to rescheduling the EBBR monthly to be the 1st Tuesday of each month? (starting next week).
g.
________________________________________
From: Grant Likely
Sent: 12 March 2019 11:38
To: rob.herring(a)linaro.org; Ben Eckermann; Dong Wei; perobins(a)redhat.com; ryan.harkin(a)linaro.org; Udit Kumar; wmills(a)ti.com; nicolas.dechesne(a)linaro.org; Tom Rini; Peter Robinson; Tony Wu; tom.rini(a)konsulko.com; Yang Zhang; Nicusor Penisoara; Andreas Färber; Michal Simek; David Rusling; Peter Jones; Mark Brown; Matthias Brugger; daniel.thompson(a)linaro.org
Subject: EBBR Monthly - 4th Tuesday
When: 28 May 2019 15:00-16:00.
Where: WebEx
Biweekly EBBR status call
- Online meeting: https://arm-onsite.webex.com/meet/gralik01
- Phone
- Access code: 809 053 990
- 1-408-792-6300 Call-in toll number (US/Canada)
- 1-877-668-4490 Call-in toll-free number (US/Canada)
- 44-203-478-5285 Call-in toll number (UK)
- 08-002061177 Call-in toll-free (UK)
More access numbers:
https://arm-onsite.webex.com/cmp3300/webcomponents/widget/globalcallin/glob…
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Quick poll: who would be interested in a U-Boot/EBBR plugfest event collocates with ELC-EU this year (week of 28th Oct)?
In the EBBR meetings we’ve tossed around the idea of an U-Boot/EBBR plugfest to work out compatibility issues between OS distros and upstream U-Boot SBC support. The idea is to get a number of SBCs supported by mainline U-Boot with UEFI features turned on, along with U-Boot & OS developers and hold a 1 day debug sprint to work out how many platforms can work with ‘stock’ OS images. Details to be worked out if this looks viable.
I’ve asked the LF folks if they have space on either Thursday 31st Oct or Friday 1st Nov. They are checking availability, but no commitments have been made. It would help to know if this date and location is feasible.
What do you think? Would you come to a plug fest attached to ELC-EU? Would you be interested in helping to organise? Or, is there another time & location that would work better?
Cheers,
g.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hi All,
Monthly EBBR meeting is scheduled for today. So far I've got the
following agenda items:
- Update on Devicetree Evolution project at Linaro (System Devicetree,
separate dts repo, spec updates)
- EBBR Plugfest options and planning committee
- Policy on DTBs shipped with OS -- does EBBR need to address this
explicitly?
Email if you have any other items.
g.
________________________________________
From: Grant Likely
Sent: 12 March 2019 11:38
To: rob.herring(a)linaro.org; Ben Eckermann; Dong Wei;
perobins(a)redhat.com; ryan.harkin(a)linaro.org; Udit Kumar; wmills(a)ti.com;
nicolas.dechesne(a)linaro.org; Tom Rini; Peter Robinson; Tony Wu;
tom.rini(a)konsulko.com; Yang Zhang; daniel.thompson(a)linaro.org; Nicusor
Penisoara; Andreas Färber; Michal Simek; David Rusling; Peter Jones;
Mark Brown; Matthias Brugger
Subject: EBBR Monthly - 4th Tuesday
When: 25 June 2019 15:00-16:00.
Where: WebEx
Biweekly EBBR status call
- Online meeting: https://arm-onsite.webex.com/meet/gralik01
- Phone
- Access code: 809 053 990
- 1-408-792-6300 Call-in toll number (US/Canada)
- 1-877-668-4490 Call-in toll-free number (US/Canada)
- 44-203-478-5285 Call-in toll number (UK)
- 08-002061177 Call-in toll-free (UK)
More access numbers:
https://arm-onsite.webex.com/cmp3300/webcomponents/widget/globalcallin/glob…
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
So trying to summarize the DT side track discussion in a different thread:
(
Shall we organize a virtual design sprint before the end of the month?
I'd like to create a section from the discussion in Boot Flows documen
)
I - Current situation is:
- DT provided by Linux kernel because it was “easier” and there was no
upstream home
- ACPI is provided by firmware (to make things simple), non secure OS can
patch them in case of issues, SecureBoot prevents those patches
OS provided DT is a cool developer facility in the context of floating DT
bindings and lack of proper upstream project. But conceptually speaking, DT
is not an OS thing and is not a firmware thing: it is a board thing that
may be massaged by firmware and consumed by OS.
With EBBR we seek a clean and salable solution that make the DT as simple
as ACPI.
II - Desired DT for EBBR policy
1) "upstream" DT
1.1) who provides DT
Board vendor make a <reference DT> that describes every hardware piece,
firmware provides a DT to OS, OS may be able to validate the DT but not
override it in secureboot production. For security and boot latency
consideration, firmware may actually need two DTs: a stripped version from
<reference DT> to operate on the minimal set of devices it want to bring up
the OS (say the <firmware DT>), a pruned/adapted version from <reference
DT> , ie without devices firmware wants to control and conforms to EBBR
spec (say the <OS DT>).
1.2) upstream <reference DT>
The board reference DT> shall be valid regardless of the firmware (may be
trusted firmware, uboot, edkII, linuxBoot...) not mentioning OS! There are
many candidates but I start to think Linaro could host a DT and EBBR
companion community project: "EBBR DTs" that will contain all the
<reference DT> from every EBBR compliant board vendor.
(Other boards can continue the mess, it is irrelevant EBBR, and us.
SecureBoot, MeasuredBoot implementations will assume EBBR compliance)
2) who sign what with what key
If we think of the following use case: Silicon Vendor provides a chip, a
board vendor provides a board, ABB builds a controller, Caterpillar creates
a mining truck with the controller, Rio Tinto operates the trck.
One possible (just designed to show case the need of various keysets) trust
chain is:
- Board key db is loaded with a board vendor, ABB and caterpillar certs.
- Trusted firmware: ABB doesn't want to deal with this, so the Board
vendor provides and signs trusted firmware, with key_tf.
- untrusted firmware: ABB selects the <firmware DT> and <OS DT> signs
both DTs and firmware with key_firmware. Trusted Firmware will validate the
signatures as key DB is loaded with ABB cert.
- grub and the OS: Caterpillar signs them with key_os (What is signed
and how it is verified is still a big discussion topic and the origin of
the sidetrack on DT)
- applications: Rio Tinto insurance company may be given the authority
to sign hosted OPTEE applications with a different key.
3) OS payload signing and verification: was the original topic of the
discussion and shall continue in the other thread.
4) operational considerations
In non SecureBoot environment, DT can be patched by OS (same as ACPI).
OS may decide to verify validaty of provided DT (mechanism yet to be
defined)
"dtb=" kernel command line parameter is still possible in non secure boot
but forbiden in secureBoot.
Le mer. 5 juin 2019 à 08:35, Tom Rini <trini(a)konsulko.com> a écrit :
> On Wed, Jun 05, 2019 at 08:29:37AM +0200, Ard Biesheuvel wrote:
> > On Wed, 5 Jun 2019 at 00:34, Tom Rini <trini(a)konsulko.com> wrote:
> > >
> > > On Tue, Jun 04, 2019 at 06:14:16PM -0400, Francois Ozog wrote:
> > > > Le mar. 4 juin 2019 à 17:31, Tom Rini <trini(a)konsulko.com> a écrit :
> > > >
> > ...
> > > > I think it may be good to validate but not provide. There is no Linux
> > > > provided ACPI table right ? So I get the point to validate a DT.
> > >
> > > There's "Linux provided" ACPI tables when someone has to decompile,
> > > fixup and re-compile their DSDT files.
> > >
> > > Or perhaps a better way to think of it is that yes, there's "Linux
> > > provided ACPI tables" when vendors are developing their hardware and
> > > correcting their ACPI tables. Same thing with DT, by and large (as
> > > overlays and secure boot are a can of worms to worry about later).
> >
> > Secure boot enabled Linux does not permit this model. Side loading of
> > DSDTs/SSDTs is disabled by the hardening patchset that all the distros
> > carry for secure boot enabled kernels.
>
> That sounds a little broken then. It should be doable so long as the
> files are signed appropriately. It's also rarer because the ACPI tables
> are functionally validated before they're put into production. That's
> largely the case here, except when we're talking about updating them for
> new support or just like the case above, fixing a problem with them.
>
> --
> Tom
>
Hi
I was tasked to come back to Linaro TSC with an answer on Linaro and kernel
lockdown for UEFI SecureBoot, hence the call for feed back.
So I did some research... The kernel lockdown does not seem to be a full
consensus yet:
https://news.ycombinator.com/item?id=16761827
I agree with Linus
<https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1654795.html>:
we should distinguish UEFI SecureBoot and how to achieve a highly secured
Operating System runtime environment.
1) UEFI SecureBoot: boot chain trust
My understanding is that UEFI SecureBoot ensures that the booted UEFI
payload is trusted.
Should the UEFI payload (a Linux OS) not be that secure it is irrelevant to
the UEFI SecureBoot itself.
2) Trustable Linux system
A trustable Linux system is UEFI SecureBoot loaded and make addition
precautions to avoid attacks and attacks to the boot chain.
If we think of a highly secured Linux, the kernel lockdown is certainly
highly desirable but just as many other aspects:
- iommu must be enabled to protect against DMA attacks
- sysfs needs to be cleaned (access rights are not tight enough)
- debugfs need to be banned (problem: some production control operations
are wrongly in debugfs)
-SE Linux
- IMA
- ...
In my view, we shall not mix the goal and the means to achieve the goal....
For instance, kernel lock down prevents iopl system call which prevents UIO
and UIO enabled DPDK drivers.
A vendor may evaluate that the security level achieved without kernel
lockdown is in line with its objectives to achieve a trustable Linux
system: loadable modules disabled by the kernel, kernel embedded initramfs,
IMA...
As a result, UEFI SecureBoot to secure the boot chain combined with
selected Linux hardening can achieve a Trustable Linux System.
As per LEDGE both are highly important I would say that 1) does not need
2) to be complete.
The way to achieve 2) is project dependent.
The LEDGE RP will need kernel lockdown because we will allow loadable
modules.
SoC vendors deriving a product out of LEDGE RP, may take different
provisions as per customer projects, in particular, they may derive a
version without lockdown but still trustable.
There is an additional twists to this.
UEFI SecureBoot does not mandate Microsoft signed keys.
But if you use Microsoft keys, I was warned that Microsoft may revoke
certificates for non locked down systems.
This warning illustrate the absolute need for independence related to UEFI
SecureBoot: I can't imagine a system in Europe (particularly in
military) prevented to boot because Microsoft revoked a certificate!!!
Cheers
FF
--
François-Frédéric Ozog | *Director Linaro Edge & Fog Computing Group*
T: +33.67221.6485
francois.ozog(a)linaro.org | Skype: ffozog
EBBR reqfers to chapter 2.6 "Requirements" of the UEFI spec if no
special exceptions are provided.
The UEFI spec requires to support HII resources in the LoadImage() boot
service. If an image contains a HII resource it has to install the
EFI_HII_PACKAGE_LIST_PROTOCOL on the image handle. But chapter 2.6 does
not generally require support for HII protocols.
It would be helpful to clarify if supporting HII resources in the
LoadImage() boot service is required to be EBBR compliant. I would
prefer EBBR not to require this as it adds a lot of complexity to the
firmware.
The UEFI spec further requires supporting loading images via the
EFI_LOAD_FILE_PROTOCOL and the EFI_LOAD_FILE2_PROTOCOL. This might also
be a candidate for skipping in the EBBR.
Best regards
Heinrich Schuchardt
I introduced the discussion topic to LEDGE Steering Committee today.
Linaro will focus on the use case where the DT is provided by the firmware.
Other use cases may be considered at a later stage.
On Thu, 6 Jun 2019 at 11:10, Tom Rini <trini(a)konsulko.com> wrote:
> On Thu, Jun 06, 2019 at 09:08:25AM +0200, Ard Biesheuvel wrote:
> > On Wed, 5 Jun 2019 at 21:28, Tom Rini <trini(a)konsulko.com> wrote:
> > >
> > > On Wed, Jun 05, 2019 at 08:30:12PM +0200, Ard Biesheuvel wrote:
> > > > On Wed, 5 Jun 2019 at 19:30, Tom Rini <trini(a)konsulko.com> wrote:
> > > > >
> > > > > On Wed, Jun 05, 2019 at 06:14:08PM +0100, Mark Brown wrote:
> > > > > > On Wed, Jun 05, 2019 at 02:16:11PM +0200, Ard Biesheuvel wrote:
> > > > > >
> > > > > > > The idea of EBBR is to move away from a vertically integrated
> model,
> > > > > > > and permit systems or appliances to use packaged OSes in the
> field,
> > > > > > > similar to how this is being done on servers today. The idea
> that it
> > > > > > > is required for, say, company X shipping product Yrev0, to
> upstream a
> > > > > > > new rev of the DT in order to tweak their board and ship
> product Yrev1
> > > > > > > is simply ridiculous. It doesn't scale, and we shouldn't care
> - the DT
> > > > > > > bindings is what we care about, and if it adheres to those, the
> > > > > > > platform can provide any DT it wants, and there is no reason
> the
> > > > > > > kernel devs should ever need to look at it.
> > > > > >
> > > > > > I don't think anyone is particularly suggesting that (at least
> not in
> > > > > > the portions of the thread I read properly, I have to confess I
> was
> > > > > > skimming a bunch of it)?
> > > > >
> > > > > Just so we're all on the same page, we do understand that someone
> > > > > somewhere is providing Yrev0.dtb and Yrev1.dtb, yes? Or are we
> > > > > expecting someone to be run-time fixing up Yboard.dtb for rev0 vs
> rev1
> > > > > vs .. ?
> > > >
> > > > Let me put it like this: company X is not interested in having to
> > > > engage with the distros to get Yrev1.dtb into the OS, nor do they
> want
> > > > to be forced to start from an official DTB and apply deltas to make
> it
> > > > correct. You ship a board with some description of the board that the
> > > > OS can understand - this is how the OS identifies which hardware it
> > > > runs on: the DT description.
> > >
> > > Where does this description that's coming with the board come from?
> > > That _matters_ if you want to have any idea what will be able to use
> it.
> >
> > From the platform, not from the OS. How the firmware achieves that is
> > left unspecified by EBBR, it only mandates that it is passed to the OS
> > via a config table.
>
> But it's part of the OS.
>
> > > > > > > For development, things are obviously different, I understand
> that.
> > > > > > > Shipping DTs for devboards makes sense, especially while the DT
> > > > > > > bindings are not set in stone yet. But imposing this model for
> > > > > > > production is unsustainable.
> > > > > >
> > > > > > I don't think I've particularly seen anyone trying to do that for
> > > > > > anything other than devboards, like Tom says people with actual
> products
> > > > > > usually don't even consider it. It's more that there is this
> devboard
> > > > > > case where the DTs are currently in kernel and a lot of the
> people
> > > > > > hacking on things are using devboards if only for want of
> anything else
> > > > > > so they naturally end up caring about that case.
> > > > >
> > > > > Keep in mind that the in-kernel dev board ones _are_ important as
> that's
> > > > > what you start your custom platform from, 9 times out of 10. It's
> quite
> > > > > often the case of "OK, $vendor gave us schematics for EVB, lets
> cut what
> > > > > we don't need and tweak" with a matching set of cuts and tweaks to
> the
> > > > > dts for the EVB. In the case of carrier+SOM it's just adding to,
> if
> > > > > using the stock carrier, or again adapting things for the custom
> > > > > carrier.
> > > >
> > > > Of course. But how is this relevant? I am not saying DTs have to be
> > > > truly original works, just that the OS should not be the one
> providing
> > > > it.
> > >
> > > Because we've been talking about where the device tree comes from, and
> I
> > > keep trying to point out that we are no where near a proven record of
> > > "DTB is always valid and functional with the Linux Kernel from here
> > > on out". There's not the tooling nor review to enforce that and
> there's
> > > a few examples every year (of just in-tree device trees, not custom end
> > > products) where it gets broken.
> >
> > So now, you are saying companies should only ship products with
> > devices trees that have been reviewed by the kernel community?
>
> No, but I am saying that intentions and reality disagree on "DTB + any
> kernel that supports those bindings" always resulting in "Everything
> continues to function as expected".
>
> > This makes no sense to me whatsoever: the DT *bindings* are the
> > contract that we have with the platforms. If someone ships a DT that
> > adheres to the bindings, we are on the hook to fix it. If someone
> > ships a broken DT, it is their problem and they are fix it in their OS
> > fork, or they issue a firmware update that fixes it.
>
> I'm saying the DT binding contracts get broken, have a track record of
> getting broken and will continue to be broken. The DTB is part of the
> OS.
>
> > > > > But maybe it's just me that's confused about what "shipping" means
> in
> > > > > this context. Almost no one bothers "shipping" the DTS files for a
> > > > > custom product to mainline Linux as no one is supposed to be
> running
> > > > > anything other than the provided software on the custom device and
> so it
> > > > > goes where ever it goes for that products needs and support plans.
> > > > > Rarely does a board, devboard or finished end-user product, ship
> with a
> > > > > DTB file stored stand-alone in a flash chip, that is intended as
> the
> > > > > final forever DTB. It's just another part of
> > > > > firmware-by-which-I-mean-the-whole-software-stack.
> > > >
> > > > Who said anything about the DT being stored in a flash chip? I
> already
> > > > explained more than once that it is up to the firmware to decide
> *how*
> > > > it stores the DT, and the filesystem is fine if it does not care
> about
> > > > security or if it implements some form of authentication.
> > >
> > > It's been stated I believe in other parts of this thread or perhaps I'm
> > > just thinking of the many other times people have talked about hardware
> > > shipping a device tree. If the hardware is shipping the DTB to use,
> > > it's often stored someplace other than normal storage so that it's not
> > > overwritten by accident. Similar to ACPI tables :)
> > >
> > > > The point is that we are trying to move from this custom device model
> > > > to a model where you can run a generic distro, without having to put
> > > > the burden on the OS vendor to bundle a DT for every platform that it
> > > > will ever run on, which is especially tricky if those platforms do
> not
> > > > exist yet.
> > >
> > > So we are, or are not trying to come up with recommendations for
> > > shipping a DTB file for hardware?
> >
> > I'm not sure i understand the question, but EBBR is not just a
> > recommendation. If you want to claim EBBR compliance, your platform
> > should be able to boot an OS that comes without bundled DTB images.
>
> No, that's not right. You are either OS+ACPI or OS+DTB. In the case of
> ACPI, other specifications deal with that. In the case of DTB there is
> not a specification that deals with these expectations, so EBBR needs to
> say something.
>
> > > > > Which is why my whole point here has been that the DTB needs to be
> > > > > treated and signature checked just like any other part of what's
> being
> > > > > loaded (kernel, initrd, grub and grub.conf OR systemd-boot and
> > > > > systemd-boot.conf, etc, etc).
> > > > >
> > > >
> > > > Again, I am not arguing that the DT should be linked into the
> firmware
> > > > executable, I am only saying that UEFI secure boot is not appropriate
> > > > for authenticating it (and that the OS should not be providing it)
> > >
> > > Are you just saying "the DT exists in the config table GUID, it is
> good"
> > > and ignoring the question of how the DT is put into the config table
> and
> > > any sort of "it is good" test?
> >
> > So now we are policing the DT as well, and checking whether it is
> > 'good' or not? The platform knows best how to describe the hardware,
> > so it is the hardware that provides the DT period. If a crappy product
> > provides a crappy DT, then you will get a crappy experience, just as
> > you might expect.
>
> I don't know why this keeps coming up. In this context, which is
> "secure boot", good means "we have done some form of cryptographic
> validation that this blob has been signed".
>
> > > Finally, is UEFI secure boot appropriate for authentication of the
> > > initrd? The bootloader config files?
> >
> > No. initrd is a file system interpreted by the Linux kernel, and we
> > already have ways to authenticate that (unless you build it into the
> > kernel image, in which case you get it for free)
>
> How are you seeing the initrd being authenticated, if not via the UEFI
> secure boot hooks?
>
> > bootloader config files are an implementation detail of the
> > bootloader, and the same reasoning applies: UEFI secure boot
> > authenticates the OS to the platform, not the other way around. If the
> > firmware wants to sign its config files, it can, and it might even
> > reuse some of the crypto code that UEFI secure boot uses. But it is
> > not part of UEFI secure boot.
>
> I disagree.
>
> --
> Tom
>
--
François-Frédéric Ozog | *Director Linaro Edge & Fog Computing Group*
T: +33.67221.6485
francois.ozog(a)linaro.org | Skype: ffozog
[ Snipping again ]
On Thu, Jun 06, 2019 at 11:10:07AM -0400, Tom Rini wrote:
>On Thu, Jun 06, 2019 at 09:08:25AM +0200, Ard Biesheuvel wrote:
>> On Wed, 5 Jun 2019 at 21:28, Tom Rini <trini(a)konsulko.com> wrote:
>> >
>> > Where does this description that's coming with the board come from?
>> > That _matters_ if you want to have any idea what will be able to use it.
>>
>> From the platform, not from the OS. How the firmware achieves that is
>> left unspecified by EBBR, it only mandates that it is passed to the OS
>> via a config table.
>
>But it's part of the OS.
And this is is the crux of the argument. The DT is *not* part of the
OS, it's a description of the *hardware* that *any* OS (or bootloader, or
whatever) should be able to use. That's the whole point.
...
>> > Because we've been talking about where the device tree comes from, and I
>> > keep trying to point out that we are no where near a proven record of
>> > "DTB is always valid and functional with the Linux Kernel from here
>> > on out". There's not the tooling nor review to enforce that and there's
>> > a few examples every year (of just in-tree device trees, not custom end
>> > products) where it gets broken.
>>
>> So now, you are saying companies should only ship products with
>> devices trees that have been reviewed by the kernel community?
>
>No, but I am saying that intentions and reality disagree on "DTB + any
>kernel that supports those bindings" always resulting in "Everything
>continues to function as expected".
>
>> This makes no sense to me whatsoever: the DT *bindings* are the
>> contract that we have with the platforms. If someone ships a DT that
>> adheres to the bindings, we are on the hook to fix it. If someone
>> ships a broken DT, it is their problem and they are fix it in their OS
>> fork, or they issue a firmware update that fixes it.
>
>I'm saying the DT binding contracts get broken, have a track record of
>getting broken and will continue to be broken. The DTB is part of the
>OS.
Contracts will continue to be broken as long as people think there is
the flexibility to break them. It's never going to improve like this!
Including the DT with the kernel was only ever intended to be a
short-term bootstrap solution until vendors caught up and started
shipping working DTBs in their firmware.
Cheers,
--
Steve McIntyre steve.mcintyre(a)linaro.org
<http://www.linaro.org/> Linaro.org | Open source software for ARM SoCs
On Wed, 5 Jun 2019 at 21:28, Tom Rini <trini(a)konsulko.com> wrote:
>
> On Wed, Jun 05, 2019 at 08:30:12PM +0200, Ard Biesheuvel wrote:
> > On Wed, 5 Jun 2019 at 19:30, Tom Rini <trini(a)konsulko.com> wrote:
> > >
> > > On Wed, Jun 05, 2019 at 06:14:08PM +0100, Mark Brown wrote:
> > > > On Wed, Jun 05, 2019 at 02:16:11PM +0200, Ard Biesheuvel wrote:
> > > >
> > > > > The idea of EBBR is to move away from a vertically integrated model,
> > > > > and permit systems or appliances to use packaged OSes in the field,
> > > > > similar to how this is being done on servers today. The idea that it
> > > > > is required for, say, company X shipping product Yrev0, to upstream a
> > > > > new rev of the DT in order to tweak their board and ship product Yrev1
> > > > > is simply ridiculous. It doesn't scale, and we shouldn't care - the DT
> > > > > bindings is what we care about, and if it adheres to those, the
> > > > > platform can provide any DT it wants, and there is no reason the
> > > > > kernel devs should ever need to look at it.
> > > >
> > > > I don't think anyone is particularly suggesting that (at least not in
> > > > the portions of the thread I read properly, I have to confess I was
> > > > skimming a bunch of it)?
> > >
> > > Just so we're all on the same page, we do understand that someone
> > > somewhere is providing Yrev0.dtb and Yrev1.dtb, yes? Or are we
> > > expecting someone to be run-time fixing up Yboard.dtb for rev0 vs rev1
> > > vs .. ?
> >
> > Let me put it like this: company X is not interested in having to
> > engage with the distros to get Yrev1.dtb into the OS, nor do they want
> > to be forced to start from an official DTB and apply deltas to make it
> > correct. You ship a board with some description of the board that the
> > OS can understand - this is how the OS identifies which hardware it
> > runs on: the DT description.
>
> Where does this description that's coming with the board come from?
> That _matters_ if you want to have any idea what will be able to use it.
>
>From the platform, not from the OS. How the firmware achieves that is
left unspecified by EBBR, it only mandates that it is passed to the OS
via a config table.
> > > > > For development, things are obviously different, I understand that.
> > > > > Shipping DTs for devboards makes sense, especially while the DT
> > > > > bindings are not set in stone yet. But imposing this model for
> > > > > production is unsustainable.
> > > >
> > > > I don't think I've particularly seen anyone trying to do that for
> > > > anything other than devboards, like Tom says people with actual products
> > > > usually don't even consider it. It's more that there is this devboard
> > > > case where the DTs are currently in kernel and a lot of the people
> > > > hacking on things are using devboards if only for want of anything else
> > > > so they naturally end up caring about that case.
> > >
> > > Keep in mind that the in-kernel dev board ones _are_ important as that's
> > > what you start your custom platform from, 9 times out of 10. It's quite
> > > often the case of "OK, $vendor gave us schematics for EVB, lets cut what
> > > we don't need and tweak" with a matching set of cuts and tweaks to the
> > > dts for the EVB. In the case of carrier+SOM it's just adding to, if
> > > using the stock carrier, or again adapting things for the custom
> > > carrier.
> >
> > Of course. But how is this relevant? I am not saying DTs have to be
> > truly original works, just that the OS should not be the one providing
> > it.
>
> Because we've been talking about where the device tree comes from, and I
> keep trying to point out that we are no where near a proven record of
> "DTB is always valid and functional with the Linux Kernel from here
> on out". There's not the tooling nor review to enforce that and there's
> a few examples every year (of just in-tree device trees, not custom end
> products) where it gets broken.
>
So now, you are saying companies should only ship products with
devices trees that have been reviewed by the kernel community?
This makes no sense to me whatsoever: the DT *bindings* are the
contract that we have with the platforms. If someone ships a DT that
adheres to the bindings, we are on the hook to fix it. If someone
ships a broken DT, it is their problem and they are fix it in their OS
fork, or they issue a firmware update that fixes it.
> > > But maybe it's just me that's confused about what "shipping" means in
> > > this context. Almost no one bothers "shipping" the DTS files for a
> > > custom product to mainline Linux as no one is supposed to be running
> > > anything other than the provided software on the custom device and so it
> > > goes where ever it goes for that products needs and support plans.
> > > Rarely does a board, devboard or finished end-user product, ship with a
> > > DTB file stored stand-alone in a flash chip, that is intended as the
> > > final forever DTB. It's just another part of
> > > firmware-by-which-I-mean-the-whole-software-stack.
> >
> > Who said anything about the DT being stored in a flash chip? I already
> > explained more than once that it is up to the firmware to decide *how*
> > it stores the DT, and the filesystem is fine if it does not care about
> > security or if it implements some form of authentication.
>
> It's been stated I believe in other parts of this thread or perhaps I'm
> just thinking of the many other times people have talked about hardware
> shipping a device tree. If the hardware is shipping the DTB to use,
> it's often stored someplace other than normal storage so that it's not
> overwritten by accident. Similar to ACPI tables :)
>
> > The point is that we are trying to move from this custom device model
> > to a model where you can run a generic distro, without having to put
> > the burden on the OS vendor to bundle a DT for every platform that it
> > will ever run on, which is especially tricky if those platforms do not
> > exist yet.
>
> So we are, or are not trying to come up with recommendations for
> shipping a DTB file for hardware?
>
I'm not sure i understand the question, but EBBR is not just a
recommendation. If you want to claim EBBR compliance, your platform
should be able to boot an OS that comes without bundled DTB images.
> > > Which is why my whole point here has been that the DTB needs to be
> > > treated and signature checked just like any other part of what's being
> > > loaded (kernel, initrd, grub and grub.conf OR systemd-boot and
> > > systemd-boot.conf, etc, etc).
> > >
> >
> > Again, I am not arguing that the DT should be linked into the firmware
> > executable, I am only saying that UEFI secure boot is not appropriate
> > for authenticating it (and that the OS should not be providing it)
>
> Are you just saying "the DT exists in the config table GUID, it is good"
> and ignoring the question of how the DT is put into the config table and
> any sort of "it is good" test?
>
So now we are policing the DT as well, and checking whether it is
'good' or not? The platform knows best how to describe the hardware,
so it is the hardware that provides the DT period. If a crappy product
provides a crappy DT, then you will get a crappy experience, just as
you might expect.
> Finally, is UEFI secure boot appropriate for authentication of the
> initrd? The bootloader config files?
>
No. initrd is a file system interpreted by the Linux kernel, and we
already have ways to authenticate that (unless you build it into the
kernel image, in which case you get it for free)
bootloader config files are an implementation detail of the
bootloader, and the same reasoning applies: UEFI secure boot
authenticates the OS to the platform, not the other way around. If the
firmware wants to sign its config files, it can, and it might even
reuse some of the crypto code that UEFI secure boot uses. But it is
not part of UEFI secure boot.
On Wed, 5 Jun 2019 at 19:30, Tom Rini <trini(a)konsulko.com> wrote:
>
> On Wed, Jun 05, 2019 at 06:14:08PM +0100, Mark Brown wrote:
> > On Wed, Jun 05, 2019 at 02:16:11PM +0200, Ard Biesheuvel wrote:
> >
> > > The idea of EBBR is to move away from a vertically integrated model,
> > > and permit systems or appliances to use packaged OSes in the field,
> > > similar to how this is being done on servers today. The idea that it
> > > is required for, say, company X shipping product Yrev0, to upstream a
> > > new rev of the DT in order to tweak their board and ship product Yrev1
> > > is simply ridiculous. It doesn't scale, and we shouldn't care - the DT
> > > bindings is what we care about, and if it adheres to those, the
> > > platform can provide any DT it wants, and there is no reason the
> > > kernel devs should ever need to look at it.
> >
> > I don't think anyone is particularly suggesting that (at least not in
> > the portions of the thread I read properly, I have to confess I was
> > skimming a bunch of it)?
>
> Just so we're all on the same page, we do understand that someone
> somewhere is providing Yrev0.dtb and Yrev1.dtb, yes? Or are we
> expecting someone to be run-time fixing up Yboard.dtb for rev0 vs rev1
> vs .. ?
>
Let me put it like this: company X is not interested in having to
engage with the distros to get Yrev1.dtb into the OS, nor do they want
to be forced to start from an official DTB and apply deltas to make it
correct. You ship a board with some description of the board that the
OS can understand - this is how the OS identifies which hardware it
runs on: the DT description.
> > > For development, things are obviously different, I understand that.
> > > Shipping DTs for devboards makes sense, especially while the DT
> > > bindings are not set in stone yet. But imposing this model for
> > > production is unsustainable.
> >
> > I don't think I've particularly seen anyone trying to do that for
> > anything other than devboards, like Tom says people with actual products
> > usually don't even consider it. It's more that there is this devboard
> > case where the DTs are currently in kernel and a lot of the people
> > hacking on things are using devboards if only for want of anything else
> > so they naturally end up caring about that case.
>
> Keep in mind that the in-kernel dev board ones _are_ important as that's
> what you start your custom platform from, 9 times out of 10. It's quite
> often the case of "OK, $vendor gave us schematics for EVB, lets cut what
> we don't need and tweak" with a matching set of cuts and tweaks to the
> dts for the EVB. In the case of carrier+SOM it's just adding to, if
> using the stock carrier, or again adapting things for the custom
> carrier.
>
Of course. But how is this relevant? I am not saying DTs have to be
truly original works, just that the OS should not be the one providing
it.
> But maybe it's just me that's confused about what "shipping" means in
> this context. Almost no one bothers "shipping" the DTS files for a
> custom product to mainline Linux as no one is supposed to be running
> anything other than the provided software on the custom device and so it
> goes where ever it goes for that products needs and support plans.
> Rarely does a board, devboard or finished end-user product, ship with a
> DTB file stored stand-alone in a flash chip, that is intended as the
> final forever DTB. It's just another part of
> firmware-by-which-I-mean-the-whole-software-stack.
>
Who said anything about the DT being stored in a flash chip? I already
explained more than once that it is up to the firmware to decide *how*
it stores the DT, and the filesystem is fine if it does not care about
security or if it implements some form of authentication.
The point is that we are trying to move from this custom device model
to a model where you can run a generic distro, without having to put
the burden on the OS vendor to bundle a DT for every platform that it
will ever run on, which is especially tricky if those platforms do not
exist yet.
> Which is why my whole point here has been that the DTB needs to be
> treated and signature checked just like any other part of what's being
> loaded (kernel, initrd, grub and grub.conf OR systemd-boot and
> systemd-boot.conf, etc, etc).
>
Again, I am not arguing that the DT should be linked into the firmware
executable, I am only saying that UEFI secure boot is not appropriate
for authenticating it (and that the OS should not be providing it)