From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Leif Lindholm" <leif.lindholm@linaro.org>,
"Thomas Panakamattam Abraham" <thomas.abraham@arm.com>,
"Nariman Poushin" <nariman.poushin@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH edk2-platforms 4/4] Platform/ARM/BdsLib: maintain alignment for DevicePaths
Date: Fri, 23 Nov 2018 10:39:58 +0100 [thread overview]
Message-ID: <d73181d2-d449-3b03-5b69-91fa6ee3ea8f@redhat.com> (raw)
In-Reply-To: <CAKv+Gu95FB7CPabcrQA1RvVigY91dA=LEvJET2yZ3NFDwDYZyQ@mail.gmail.com>
On 11/23/18 09:35, Ard Biesheuvel wrote:
> On Thu, 22 Nov 2018 at 19:35, Laszlo Ersek <lersek@redhat.com> wrote:
>> [...]
> Indeed. I am updating the second patch to get rid of everything in
> BdsLib we are not currently using.
Thanks!
> Looking at 56bed2f41022afcbadecc9f2d537bd31c3d44cbc ("^W never mind
> ...
heh :)
> the intent appears to be that device path struct members do appear
> naturally aligned, even if the size of the data structure is not a
> multiple of the max alignment we expect to encounter.
>
> Presumably, this is why CoreConnectController () does the same in this
> regard.
Yeah, that's certainly for working around bugs elsewhere in the
firmware. The UEFI spec 2.7 says in "10.3.1 Generic Device Path
Structures":
A Device Path is a series of generic Device Path nodes. The first
Device Path node starts at byte offset zero of the Device Path. The
next Device Path node starts at the end of the previous Device Path
node. Therefore all nodes are byte-packed data structures that may
appear on any byte boundary. *All code references to device path
notes must assume all fields are unaligned.*
(Emphasis mine. And yes, the exact sentence that I'm quoting this
section for contains a typo, s/notes/nodes/.)
[...]
Thanks!
Laszlo
next prev parent reply other threads:[~2018-11-23 9:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 17:26 [PATCH edk2-platforms 0/4] Platform/ARM: fix DevicePath mishandling in BdsLib Ard Biesheuvel
2018-11-22 17:26 ` [PATCH edk2-platforms 1/4] Platform/ARM: import ARM platform specific BdsLib header Ard Biesheuvel
2018-11-22 17:36 ` Laszlo Ersek
2018-11-22 17:26 ` [PATCH edk2-platforms 2/4] Platform/ARM/BdsLid: drop unused BdsStartEfiApplication () Ard Biesheuvel
2018-11-22 17:55 ` Laszlo Ersek
2018-11-22 17:26 ` [PATCH edk2-platforms 3/4] Platform/ARM/BdsLib: don't clobber BdsLoadImage() DevicePath IN param Ard Biesheuvel
2018-11-22 18:09 ` Laszlo Ersek
2018-11-22 18:14 ` Ard Biesheuvel
2018-11-22 18:23 ` Laszlo Ersek
2018-11-22 17:26 ` [PATCH edk2-platforms 4/4] Platform/ARM/BdsLib: maintain alignment for DevicePaths Ard Biesheuvel
2018-11-22 18:35 ` Laszlo Ersek
2018-11-23 8:35 ` Ard Biesheuvel
2018-11-23 9:39 ` Laszlo Ersek [this message]
2018-11-23 4:20 ` [PATCH edk2-platforms 0/4] Platform/ARM: fix DevicePath mishandling in BdsLib Thomas Abraham
2018-11-23 8:44 ` Ard Biesheuvel
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-list 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=d73181d2-d449-3b03-5b69-91fa6ee3ea8f@redhat.com \
--to=devel@edk2.groups.io \
/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