[GIT PULL] bootconfig: Fixes for v7.3-rc7
From: Google
Date: Tue Oct 13 2026 - 19:22:02 EST
Hi Linus,
Bootconfig fixes for v7.3-rc7:
- bootconfig: give the footer size static_assert a message
Add a message to static_assert() macro because it is required for
the compiler before C23. This fixes a warning.
Please pull the latest bootconfig-fixes-v7.3-rc7 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
bootconfig-fixes-v7.3-rc7
Tag SHA1: 15cf6dec78bb629a26494361097c4850c6956d83
Head SHA1: a1ddc2721467fb68241372db77657fd0dcf6cda5
Sasha Levin (1):
bootconfig: give the footer size static_assert a message
----
tools/bootconfig/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---------------------------
commit a1ddc2721467fb68241372db77657fd0dcf6cda5
Author: Sasha Levin <sashal@xxxxxxxxxx>
Date: Sun Oct 11 18:33:41 2026 -0400
bootconfig: give the footer size static_assert a message
static_assert() without a message is a C23 feature, so clang warns:
main.c:498:56: warning: '_Static_assert' with no message is a C23 extension [-Wc23-extensions]
Add a message.
Link: http://lkml.kernel.org/r/20261011223358.2327625-13-sashal@xxxxxxxxxx
Fixes: 6ed5e20466c79 ("bootconfig: Fix unaligned access when building footer")
Cc: stable@xxxxxxxxxxxxxxx
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 17d971d47f87..df0534035857 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -495,7 +495,8 @@ static int apply_xbc(const char *path, const char *xbc_path)
footer.size = htole32(size);
footer.csum = htole32(csum);
memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN);
- static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE);
+ static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE,
+ "bootconfig footer size mismatch");
memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE);
total_size = size + BOOTCONFIG_FOOTER_SIZE;
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>