public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@kernel•org>
To: Ard Biesheuvel <ardb@kernel•org>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: build failure after merge of the efi-fixes tree
Date: Tue, 28 Apr 2026 12:22:49 +0200	[thread overview]
Message-ID: <20260428102251.3877875-1-thierry.reding@kernel.org> (raw)

Hi all,

After merging the efi-fixes tree, today's linux-next build (all of them)
failed like this:

    /srv/kbuild/next/linux.git/fs/efivarfs/super.c: In function 'efivarfs_d_hash':
    /srv/kbuild/next/linux.git/fs/efivarfs/super.c:183:20: error: assignment of member 'hash' in read-only object
      183 |         qstr->hash = end_name_hash(hash);
          |                    ^
    /srv/kbuild/next/linux.git/fs/efivarfs/super.c: At top level:
    /srv/kbuild/next/linux.git/fs/efivarfs/super.c:189:19: error: initialization of 'int (*)(const struct dentry *, struct qstr *)' from incompatible pointer type 'int (*)(const struct dentry *, const struct qstr *)' [-Wincompatible-pointer-types]
      189 |         .d_hash = efivarfs_d_hash,
          |                   ^~~~~~~~~~~~~~~
Caused by commit

    9c7c5eec5bca ("efivarfs: use QSTR() in efivarfs_alloc_dentry")

and like this:

    arm-linux-gnueabihf-ld: drivers/firmware/efi/libstub/relocate.stub.o: in function `efi_relocate_kernel':
    /srv/kbuild/next/linux.git/drivers/firmware/efi/libstub/relocate.c:161:(.text+0x278): undefined reference to `efi_cache_sync_image'
    arm-linux-gnueabihf-ld: arch/arm/boot/compressed/vmlinux: hidden symbol `efi_cache_sync_image' isn't defined
    arm-linux-gnueabihf-ld: final link failed: bad value

Caused by commit

    4db2b7fdd6c9 ("efi/libstub: Synchronize instruction cache after kernel relocation")

I've fixed up both issues with the following patches, please squash these
or equivalent changes into your tree to fix this.

Thanks,
Thierry

--- >8 ---
From a69b4ac52d86720885f49fb3a1d5a2311c652e17 Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia•com>
Date: Tue, 28 Apr 2026 11:53:12 +0200
Subject: [PATCH] efivarfs: Unconstify variable

The qstr structure is being written to in efivarfs_d_hash(), so it
cannot be made const.

Signed-off-by: Thierry Reding <treding@nvidia•com>
---
 fs/efivarfs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
index 360d152e18af..733c19571f1c 100644
--- a/fs/efivarfs/super.c
+++ b/fs/efivarfs/super.c
@@ -167,7 +167,7 @@ static int efivarfs_d_compare(const struct dentry *dentry,
 	return strncasecmp(name->name + guid, str + guid, EFI_VARIABLE_GUID_LEN);
 }
 
-static int efivarfs_d_hash(const struct dentry *dentry, const struct qstr *qstr)
+static int efivarfs_d_hash(const struct dentry *dentry, struct qstr *qstr)
 {
 	unsigned long hash = init_name_hash(dentry);
 	const unsigned char *s = qstr->name;
@@ -191,7 +191,7 @@ static const struct dentry_operations efivarfs_d_ops = {
 
 static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name)
 {
-	const struct qstr q = QSTR(name);
+	struct qstr q = QSTR(name);
 	struct dentry *d;
 	int err;
 
-- 
2.52.0
--- >8 ---

--- >8 ---
From 1cd92fb251ee4fd59150863208a7d3660ec6b1cd Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia•com>
Date: Tue, 28 Apr 2026 12:05:30 +0200
Subject: [PATCH] efi/libstub: Make efi_cache_sync_image() always available

Currently this is only available when zboot is included. Make sure it's
always there to allow using it from other places in the EFI stub.

Signed-off-by: Thierry Reding <treding@nvidia•com>
---
 drivers/firmware/efi/libstub/efi-stub.c | 7 +++++++
 drivers/firmware/efi/libstub/zboot.c    | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c
index 42d6073bcd06..6d635dddfa36 100644
--- a/drivers/firmware/efi/libstub/efi-stub.c
+++ b/drivers/firmware/efi/libstub/efi-stub.c
@@ -48,6 +48,13 @@
 static u64 virtmap_base = EFI_RT_VIRTUAL_BASE;
 static bool flat_va_mapping = (EFI_RT_VIRTUAL_OFFSET != 0);
 
+void __weak efi_cache_sync_image(unsigned long image_base,
+				 unsigned long alloc_size)
+{
+	// Provided by the arch to perform the cache maintenance necessary for
+	// executable code loaded into memory to be safe for execution.
+}
+
 void __weak free_primary_display(struct sysfb_display_info *dpy)
 { }
 
diff --git a/drivers/firmware/efi/libstub/zboot.c b/drivers/firmware/efi/libstub/zboot.c
index 4b76f74c56da..d77c8059533f 100644
--- a/drivers/firmware/efi/libstub/zboot.c
+++ b/drivers/firmware/efi/libstub/zboot.c
@@ -19,13 +19,6 @@ static unsigned long alloc_preferred_address(unsigned long alloc_size)
 	return ULONG_MAX;
 }
 
-void __weak efi_cache_sync_image(unsigned long image_base,
-				 unsigned long alloc_size)
-{
-	// Provided by the arch to perform the cache maintenance necessary for
-	// executable code loaded into memory to be safe for execution.
-}
-
 struct sysfb_display_info *alloc_primary_display(void)
 {
 	return __alloc_primary_display();
-- 
2.52.0
--- >8 ---

             reply	other threads:[~2026-04-28 10:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 10:22 Thierry Reding [this message]
2026-04-28 10:25 ` linux-next: build failure after merge of the efi-fixes tree Ard Biesheuvel
  -- strict thread matches above, loose matches on Subject: below --
2023-03-13 22:40 Stephen Rothwell
2023-03-13 23:06 ` Ard Biesheuvel

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=20260428102251.3877875-1-thierry.reding@kernel.org \
    --to=thierry.reding@kernel$(echo .)org \
    --cc=ardb@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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