From: "Ard Biesheuvel" <ardb@kernel.org>
To: "MaeeFilho FL" <joaoanandalima@gmail.com>
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
"Kees Cook" <keescook@chromium.org>
Subject: Re: [PATCH] lkdtm: Add more EFI runtime tests
Date: Mon, 12 Oct 2026 07:23:53 +0200 [thread overview]
Message-ID: <060961e6-37d2-4343-ab11-be94c728c19e@app.fastmail.com> (raw)
In-Reply-To: <CAFA5sMdbmqyqPhQ7Bqayd4-PBbA6RGHxgy7kFa_uF7mJWtFDLQ@mail.gmail.com>
On Sun, 11 Oct 2026, at 16:48, MaeeFilho FL wrote:
> Hi Ard,
>
> The Code is excellent. A few points worth highlighting:
>
>> Two bugs were found in the arm64 EFI runtime support that weren't caught
>> by LKDTM. The existing EFI_RUNTIME_CRASH test instructs the firmware to
>> write to kernel memory that is mapped read-only, which usually fails as
>> expected. However, this does not exercise the runtime mapping logic in
>> the kernel, nor the fault recovery logic when the faulting address is
>> inside the EFI runtime memory regions itself.
>>
>> So add two more test cases:
>> - a write to R/O memory test that uses the firmware's own executable
>> memory as an output buffer
>> - a branch to memory that is occupied by the firmware's runtime services
>> function table, which is usually mapped non-execute.
>
> This is an excellent addition to the LKDTM suite. Forcing GetTime() to
> target efi.runtime->set_time is a very clever way to ensure that the
> firmware page tables are strictly enforcing permissions over its own
> executable boundaries, rather than just testing general kernel mappings.
>
> The execution tracking via the anonymous function pointer struct conversion
> to trap NX faults on efi.runtime data object is also rock solid and properly
> exercises the arm64 translation tables validation logic.
>
> Reviewed-by: João Guilherme da Silva Freitas Lima <joaoanandalima@gmail.com>
Thanks, but next time, please don't bother with the LLM generated reviews
unless there is actionable feedback.
next prev parent reply other threads:[~2026-10-12 5:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 14:48 [PATCH] lkdtm: Add more EFI runtime tests MaeeFilho FL
2026-10-12 5:23 ` Ard Biesheuvel [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-11 11:40 Ard Biesheuvel
2026-10-12 17:07 ` Kees Cook
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=060961e6-37d2-4343-ab11-be94c728c19e@app.fastmail.com \
--to=ardb@kernel.org \
--cc=joaoanandalima@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.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