Re: Remove WARN_ONCE for unaligned UEFI region?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 5 Nov 2022 at 20:49, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> So this has been going on since I got my M2 laptop, but I finally
> decided it's really annoying and would like it removed..
>
> The arm64 EFI code does that
>
>         if (WARN_ONCE(!PAGE_ALIGNED(md->phys_addr),
>                       "UEFI Runtime regions are not aligned to 64 KB
> -- buggy firmware?"))
>
> for unaligned UEFI data, and that most definitely triggers on the M2.
>
> Yet I can't really see the point of the stack trace and register dump
> for something like this.
>
> IOW, why isn't it just a
>
>         if (!PAGE_ALIGNED(md->phys_addr)) {
>                 pr_warn_once("UEFI Runtime regions are not aligned to
> 64 KB -- buggy firmware?");
>                 return pgprot_val(PAGE_KERNEL_EXEC);
>         }
>
> instead?
>
> As it is, it's just annoying, and doesn't actually even tell anything
> interesting. The stack trace points to arm_enable_runtime_services(),
> which isn't a surprise, and it's obviously just that
> efi_virtmap_init() got inlined.
>
> Now, if it actually mentioned which mapping it was that was unaligned,
> maybe that would be interesting, but it doesn't even do that. So it's
> just noise with no actual information in it.
>
> I get a number of other warnings on the M2 ("Unable to detect cache
> hierarchy for CPU X"), but hey, that's normal. My regular Threadripper
> workstation also has ACPI warnings ("Failure creating named object")
> due to duplicate objects etc. Firmware is buggy - what else is new?
> That's just how life is.
>
> But using WARN_ON() instead of "pr_warn()" for it seems a bit excessive.
>
> I can do that change myself, or take a patch the usual ways, but let's
> get rid of this annoyance, ok? Just let me know.
>

Yeah just rip it out. In the beginning, we tended to make these
warnings noisy so people will actually notice.

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.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux