From: David Gibson <david@gibson.dropbear.id.au>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] RFC: build-sys: drop dtc submodule
Date: Fri, 27 Aug 2021 12:39:34 +1000 [thread overview]
Message-ID: <YShQZmA24aYsNWhN@yekko> (raw)
In-Reply-To: <CAJ+F1C+fxCyW+SrORudyoBi=ZYQD_v2MkAdRbaVgW-gh9580QA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2511 bytes --]
On Thu, Aug 26, 2021 at 11:34:59AM +0400, Marc-André Lureau wrote:
> Hi
>
> On Thu, Aug 26, 2021 at 7:11 AM David Gibson <david@gibson.dropbear.id.au>
> wrote:
>
> > On Thu, Aug 26, 2021 at 12:11:17AM +0400, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Thu, Aug 26, 2021 at 12:00 AM Peter Maydell <peter.maydell@linaro.org
> > >
> > > wrote:
> > >
> > > > On Wed, 25 Aug 2021 at 20:55, Marc-André Lureau
> > > > <marcandre.lureau@gmail.com> wrote:
> > > > > fdt_check_full was added in 1.4.7:
> > > > > https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.4.7
> > > > >
> > > > > Only ubuntu appears to be lagging a bit behind. I wonder if they
> > would
> > > > consider an update.
> > > >
> > > > I doubt it. You would need to wait until that actually falls off
> > > > our supported list. You also have a couple of years to wait until
> > > > Debian oldstable is no longer on our supported list.
> > > >
> > > > Maybe, I don't know why debian oldstable would have received a new
> > version
> > > plus fixes, and not ubuntu.
> > >
> > > It seems we could have our own fallback copy of fdt_check_full() though..
> > > I'll give that a try.
> >
> > We could, but fdt_check_full() is actually a pretty complex function.
> >
> >
> Yeah, that would be used for those who don't have >= 1.4.7.
>
> Alternatively we could lower the fdt_check_full to fdt_check_header in this
> case? It seems it is used to verify the DT from SLOF. It may be trusted I
> suppose, or a malformed DT may only impact the guest?
No, fdt_check_header() isn't enough. We can't trust the dt blob from
SLOF, because it's coming from guest context. We *expect* it to come
from the SLOF iamge we control, but nothing prevents anything else in
the guest from calling the hypercall, or corrupting the in-memory SLOF
image.
And, a bad DT won't just impact the guest - there's a couple of things
we need from it (that's the only reason we need to have SLOF give us
back the DT at all). Note that the blob might not just have bad
content, but could have bad formatting which will make the functions
qemu uses to access it misbehave. So, our options are either be
super-careful on every possible DT access after this point, or
pre-check it when it's loaded with fdt_check_full().
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-08-27 2:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 12:43 [PATCH] RFC: build-sys: drop dtc submodule marcandre.lureau
2021-08-25 13:03 ` Mark Cave-Ayland
2021-08-25 13:23 ` Philippe Mathieu-Daudé
2021-08-25 18:12 ` Peter Maydell
2021-08-25 19:55 ` Marc-André Lureau
2021-08-25 19:59 ` Peter Maydell
2021-08-25 20:11 ` Marc-André Lureau
2021-08-26 3:10 ` David Gibson
2021-08-26 7:34 ` Marc-André Lureau
2021-08-26 7:38 ` Philippe Mathieu-Daudé
2021-08-27 2:39 ` David Gibson [this message]
2021-08-27 9:01 ` Daniel P. Berrangé
2021-08-27 9:10 ` Marc-André Lureau
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=YShQZmA24aYsNWhN@yekko \
--to=david@gibson.dropbear.id.au \
--cc=f4bug@amsat.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=marcandre.lureau@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).