Remove WARN_ONCE for unaligned UEFI region?

Ard Biesheuvel ardb at kernel.org
Sat Nov 5 14:54:04 PDT 2022


(cc Heinrich and Ilias)

On Sat, 5 Nov 2022 at 21:27, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> On Sat, Nov 5, 2022 at 1:18 PM Ard Biesheuvel <ardb at kernel.org> wrote:
> >
> > Yeah just rip it out. In the beginning, we tended to make these
> > warnings noisy so people will actually notice.
>
> Rip it out entirely, or replace ith pr_warn_once()?
>

A warning that can only trigger on 16k or 64k page size kernels
clearly doesn't have a lot of coverage, so either we just drop it, or
we make the warning use SZ_64K and not PAGE_SIZE.

And if we keep the warning, it should be separate from the if(): when
the regions are misaligned, we have to use RWX mappings because an
adjacent region that gets covered by the same mapping might require
it.

Maybe I'll just whip up a patch myself.

> > I'd still like to see a memory map (boot with efi=debug) so we can get
> > this reported and fixed in uboot. We need that so 16k and 64k pages
> > boot doesn't cause surprises with overlapping mappings.
>
> Here's the dmesg attached with efi=debug for your viewing pleasure.
>

Thanks.

I've cc'ed the u-boot EFI maintainers, who take EFI spec compliance
very seriously, so I'm sure we'll get this fixed quickly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msg.out
Type: application/octet-stream
Size: 52374 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20221105/9ee8793f/attachment-0001.obj>


More information about the linux-arm-kernel mailing list