From: Yonghong Song <yonghong.song@linux.dev>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>,
kernel-team@fb.com
Subject: [PATCH bpf-next] bpf: Remove unused BTF_FMODEL_STRUCT_ARG
Date: Sun, 2 Aug 2026 22:27:26 -0700 [thread overview]
Message-ID: <20260803052726.2821447-1-yonghong.song@linux.dev> (raw)
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
next reply other threads:[~2026-08-03 5:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 5:27 Yonghong Song [this message]
2026-08-03 5:37 ` [PATCH bpf-next] bpf: Remove unused BTF_FMODEL_STRUCT_ARG Leon Hwang
2026-08-03 11:32 ` Jiri Olsa
2026-08-03 13:00 ` patchwork-bot+netdevbpf
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=20260803052726.2821447-1-yonghong.song@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kernel-team@fb.com \
/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