linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ard Biesheuvel <ardb@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Cc: linux-efi <linux-efi@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Remove WARN_ONCE for unaligned UEFI region?
Date: Sat, 5 Nov 2022 12:49:11 -0700	[thread overview]
Message-ID: <CAHk-=whPRmHQ=KV9B3_jeOG4ydj8gkMwQKnde7BJ4wJjveyMDQ@mail.gmail.com> (raw)

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.

               Linus

             reply	other threads:[~2022-11-05 19:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 19:49 Linus Torvalds [this message]
2022-11-05 20:18 ` Remove WARN_ONCE for unaligned UEFI region? Ard Biesheuvel
2022-11-05 20:27   ` Linus Torvalds
2022-11-05 21:54     ` Ard Biesheuvel
2022-11-05 22:43       ` Ard Biesheuvel
2022-11-06  2:29         ` Heinrich Schuchardt
2022-11-06  9:31           ` Ard Biesheuvel
2022-11-05 23:11       ` Heinrich Schuchardt

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='CAHk-=whPRmHQ=KV9B3_jeOG4ydj8gkMwQKnde7BJ4wJjveyMDQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=will@kernel.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).