public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "WANG Rui" <r@hev.cc>, "Huacai Chen" <chenhuacai@kernel.org>
Cc: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"WANG Xuerui" <kernel@xen0n.name>,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	loongarch@lists.linux.dev
Subject: Re: [RESEND PATCH v2 0/2] efi/libstub: Ensure instruction cache coherency after kernel relocation
Date: Tue, 28 Apr 2026 13:07:08 +0200	[thread overview]
Message-ID: <e631d1e5-3f05-42ab-885d-4bd660612d63@app.fastmail.com> (raw)
In-Reply-To: <d7197b01-9b7e-4f0a-bcd2-9d6d894e8cd9@app.fastmail.com>



On Mon, 27 Apr 2026, at 18:11, Ard Biesheuvel wrote:
> On Mon, 27 Apr 2026, at 10:47, WANG Rui wrote:
>> Changes since [v1]:
>>   * Move efi_cache_sync_image() after check_platform_features(), matching arm64.
>>   * Add "()" after function name in the subject.
>>
>> The EFI stub relocates the kernel image by copying it to a new memory
>> location using memcpy(). On architectures where the instruction and data
>> caches are not automatically coherent, the copied instructions may not be
>> visible to the instruction fetch unit without explicit cache maintenance.
>>
>> This series adds the missing call to efi_cache_sync_image() in the generic
>> relocation path, and provides a LoongArch implementation using the ibar
>> instruction to ensure instruction fetches observe the updated contents.
>>
>> [v1]: https://lore.kernel.org/loongarch/20260427034451.717817-1-r@hev.cc
>>
>> WANG Rui (2):
>>   efi/loongarch: Implement efi_cache_sync_image
>>   efi/libstub: Synchronize instruction cache after kernel relocation
>>
>
> Queued up in efi/urgent - thanks.
>

This breaks the ARM build.

Since LoongArch is the only remaining user of efi_relocate_kernel(), I'll move it into drivers/firmware/efi/libstub/loongarch-stub.c first, and fix up these patches accordingly afterwards (no need to resend anything)


  reply	other threads:[~2026-04-28 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27  8:47 [RESEND PATCH v2 0/2] efi/libstub: Ensure instruction cache coherency after kernel relocation WANG Rui
2026-04-27  8:47 ` [RESEND PATCH v2 1/2] efi/loongarch: Implement efi_cache_sync_image() WANG Rui
2026-04-27  8:47 ` [RESEND PATCH v2 2/2] efi/libstub: Synchronize instruction cache after kernel relocation WANG Rui
2026-04-27 16:11 ` [RESEND PATCH v2 0/2] efi/libstub: Ensure instruction cache coherency " Ard Biesheuvel
2026-04-28 11:07   ` Ard Biesheuvel [this message]
2026-04-29  7:32     ` Huacai Chen

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=e631d1e5-3f05-42ab-885d-4bd660612d63@app.fastmail.com \
    --to=ardb@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kernel@xen0n.name \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=r@hev.cc \
    /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