* [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags
@ 2026-01-06 15:30 Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 1/2] HID: bpf: fix bpf compilation with -fms-extensions Benjamin Tissoires
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2026-01-06 15:30 UTC (permalink / raw)
To: Jiri Kosina, Shuah Khan
Cc: linux-input, linux-kernel, linux-kselftest, Benjamin Tissoires
Since the merge with v6.19-rc my CI is broken because of the newly
enabled -fms-extensions.
Add the missing flags when generating the CFLAGS for bpf.o to solve this
and continue running the tests while applying the patches.
Cheers,
Benjamin
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Benjamin Tissoires (2):
HID: bpf: fix bpf compilation with -fms-extensions
selftests/hid: fix bpf compilations due to -fms-extensions
drivers/hid/bpf/progs/Makefile | 6 ++++--
tools/testing/selftests/hid/Makefile | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
---
base-commit: fde4ce068d1bccacf1e2d6a28697a3847f28e0a6
change-id: 20260106-wip-fix-bpf-compilation-4707e0faacb1
Best regards,
--
Benjamin Tissoires <bentiss@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] HID: bpf: fix bpf compilation with -fms-extensions
2026-01-06 15:30 [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
@ 2026-01-06 15:30 ` Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 2/2] selftests/hid: fix bpf compilations due to -fms-extensions Benjamin Tissoires
2026-01-07 14:05 ` [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2026-01-06 15:30 UTC (permalink / raw)
To: Jiri Kosina, Shuah Khan
Cc: linux-input, linux-kernel, linux-kselftest, Benjamin Tissoires
Similar to commit 835a50753579 ("selftests/bpf: Add -fms-extensions to
bpf build flags") and commit 639f58a0f480 ("bpftool: Fix build warnings
due to MS extensions")
The kernel is now built with -fms-extensions, therefore
generated vmlinux.h contains types like:
struct slab {
..
struct freelist_counters;
};
Use -fms-extensions and -Wno-microsoft-anon-tag flags
to build bpf programs that #include "vmlinux.h"
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
drivers/hid/bpf/progs/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/bpf/progs/Makefile b/drivers/hid/bpf/progs/Makefile
index ec1fc642fd63..66b8f38e591d 100644
--- a/drivers/hid/bpf/progs/Makefile
+++ b/drivers/hid/bpf/progs/Makefile
@@ -56,8 +56,10 @@ clean:
%.bpf.o: %.bpf.c vmlinux.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BPF,$@)
- $(Q)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(INCLUDES) \
- -c $(filter %.c,$^) -o $@ && \
+ $(Q)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(INCLUDES) \
+ -Wno-microsoft-anon-tag \
+ -fms-extensions \
+ -c $(filter %.c,$^) -o $@ && \
$(LLVM_STRIP) -g $@
vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) | $(INCLUDE_DIR)
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] selftests/hid: fix bpf compilations due to -fms-extensions
2026-01-06 15:30 [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 1/2] HID: bpf: fix bpf compilation with -fms-extensions Benjamin Tissoires
@ 2026-01-06 15:30 ` Benjamin Tissoires
2026-01-07 14:05 ` [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2026-01-06 15:30 UTC (permalink / raw)
To: Jiri Kosina, Shuah Khan
Cc: linux-input, linux-kernel, linux-kselftest, Benjamin Tissoires
Similar to commit 835a50753579 ("selftests/bpf: Add -fms-extensions to
bpf build flags") and commit 639f58a0f480 ("bpftool: Fix build warnings
due to MS extensions")
The kernel is now built with -fms-extensions, therefore
generated vmlinux.h contains types like:
struct slab {
..
struct freelist_counters;
};
Use -fms-extensions and -Wno-microsoft-anon-tag flags
to build bpf programs that #include "vmlinux.h"
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
tools/testing/selftests/hid/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile
index 2839d2612ce3..50ec9e0406ab 100644
--- a/tools/testing/selftests/hid/Makefile
+++ b/tools/testing/selftests/hid/Makefile
@@ -184,6 +184,8 @@ MENDIAN=$(if $(IS_LITTLE_ENDIAN),-mlittle-endian,-mbig-endian)
CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG))
BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \
+ -Wno-microsoft-anon-tag \
+ -fms-extensions \
-I$(INCLUDE_DIR)
CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags
2026-01-06 15:30 [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 1/2] HID: bpf: fix bpf compilation with -fms-extensions Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 2/2] selftests/hid: fix bpf compilations due to -fms-extensions Benjamin Tissoires
@ 2026-01-07 14:05 ` Benjamin Tissoires
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2026-01-07 14:05 UTC (permalink / raw)
To: Jiri Kosina, Shuah Khan, Benjamin Tissoires
Cc: linux-input, linux-kernel, linux-kselftest
On Tue, 06 Jan 2026 16:30:53 +0100, Benjamin Tissoires wrote:
> Since the merge with v6.19-rc my CI is broken because of the newly
> enabled -fms-extensions.
>
> Add the missing flags when generating the CFLAGS for bpf.o to solve this
> and continue running the tests while applying the patches.
>
> Cheers,
> Benjamin
>
> [...]
Applied to hid/hid.git (for-6.19/upstream-fixes), thanks!
[1/2] HID: bpf: fix bpf compilation with -fms-extensions
https://git.kernel.org/hid/hid/c/b7666c891cc7
[2/2] selftests/hid: fix bpf compilations due to -fms-extensions
https://git.kernel.org/hid/hid/c/e03fb369b083
Cheers,
--
Benjamin Tissoires <bentiss@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-07 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 15:30 [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 1/2] HID: bpf: fix bpf compilation with -fms-extensions Benjamin Tissoires
2026-01-06 15:30 ` [PATCH 2/2] selftests/hid: fix bpf compilations due to -fms-extensions Benjamin Tissoires
2026-01-07 14:05 ` [PATCH 0/2] HID: bpf: fix HID-BPF CI due to new compiler flags Benjamin Tissoires
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox