BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: Remove unused BTF_FMODEL_STRUCT_ARG
@ 2026-08-03  5:27 Yonghong Song
  2026-08-03  5:37 ` Leon Hwang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yonghong Song @ 2026-08-03  5:27 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Eduard Zingerman, kernel-team

Commit 814cba835ef6 ("bpf, x86: Fix trampoline stack size for 128-bit
arguments") changed the x86 trampoline to compute the number of
registers from arg_size for every argument, which removed the last user
of BTF_FMODEL_STRUCT_ARG. No other architecture or verifier code looks
at the flag, so remove the macro and the code in __get_type_fmodel_flags()
which sets it.

Keep BTF_FMODEL_SIGNED_ARG at BIT(1) rather than renumbering it to
BIT(0), so BIT(0) is available for a future flag.

No functional change.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
---
 include/linux/bpf.h | 3 ---
 kernel/bpf/btf.c    | 2 --
 2 files changed, 5 deletions(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 356884587ae1..73bacfc6444d 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1207,9 +1207,6 @@ struct bpf_prog_offload {
 	u32			jited_len;
 };
 
-/* The argument is a structure or a union. */
-#define BTF_FMODEL_STRUCT_ARG		BIT(0)
-
 /* The argument is signed. */
 #define BTF_FMODEL_SIGNED_ARG		BIT(1)
 
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 5e8ac45ce56a..42414633cf26 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -7533,8 +7533,6 @@ static u8 __get_type_fmodel_flags(const struct btf_type *t)
 {
 	u8 flags = 0;
 
-	if (btf_type_is_struct(t))
-		flags |= BTF_FMODEL_STRUCT_ARG;
 	if (btf_type_is_signed_int(t))
 		flags |= BTF_FMODEL_SIGNED_ARG;
 
-- 
2.53.0-Meta


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-03 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03  5:27 [PATCH bpf-next] bpf: Remove unused BTF_FMODEL_STRUCT_ARG Yonghong Song
2026-08-03  5:37 ` Leon Hwang
2026-08-03 11:32 ` Jiri Olsa
2026-08-03 13:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox