On Fri, 14 Feb 2020 at 13:55, Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > Hi, > > On 2/13/20 11:21 AM, Ard Biesheuvel wrote: > > The mixed mode runtime wrappers are fragile when it comes to how the > > memory referred to by its pointer arguments are laid out in memory, > > due to the fact that it translates these addresses to physical addresses > > that the runtime services can dereference when running in 1:1 mode. > > > > As a quick (i.e., backportable) fix, copy GUID pointer arguments to > > the local stack into a buffer that is naturally aligned to its size, > > so that is guaranteed to cover only one physical page. > > > > Note that on x86, we cannot rely on the stack pointer being aligned > > the way the compiler expects, so we need to allocate an 8-byte aligned > > buffer of sufficient size, and copy the GUID into that buffer at an > > offset that is aligned to 16 bytes. > > > > Reported-by: Hans de Goede <hdegoede@xxxxxxxxxx> > > Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx> > > I can confirm that this fixes the WARN_ON triggering I was seeing, > thanks: > > Tested-by: Hans de Goede <hdegoede@xxxxxxxxxx> > Thanks Hans I'll let these soak a bit in efi/urgent before I send them to tip.