BPF List
 help / color / mirror / Atom feed
* [PATCH] bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check
@ 2026-06-18  4:09 Thiébaud Weksteen
  2026-06-18  9:58 ` Jakub Sitnicki
  0 siblings, 1 reply; 2+ messages in thread
From: Thiébaud Weksteen @ 2026-06-18  4:09 UTC (permalink / raw)
  To: bpf; +Cc: Daniel Borkmann, Alexei Starovoitov, Thiébaud Weksteen

When struct prog_assoc_struct_ops was added,
BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD referenced prog_fd instead of the
actual last field, flags.

Fixes: b5709f6d26d6 ("bpf: Support associating BPF program with struct_ops")
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
---
 kernel/bpf/syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 630d530782fe..eb52ba57ffd5 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -6189,7 +6189,7 @@ static int prog_stream_read(union bpf_attr *attr)
 	return ret;
 }
 
-#define BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD prog_assoc_struct_ops.prog_fd
+#define BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD prog_assoc_struct_ops.flags
 
 static int prog_assoc_struct_ops(union bpf_attr *attr)
 {
-- 
2.54.0.1189.g8c84645362-goog


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

* Re: [PATCH] bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check
  2026-06-18  4:09 [PATCH] bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check Thiébaud Weksteen
@ 2026-06-18  9:58 ` Jakub Sitnicki
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Sitnicki @ 2026-06-18  9:58 UTC (permalink / raw)
  To: Thiébaud Weksteen; +Cc: bpf, Daniel Borkmann, Alexei Starovoitov

On Thu, Jun 18, 2026 at 02:09 PM +10, Thiébaud Weksteen wrote:
> When struct prog_assoc_struct_ops was added,
> BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD referenced prog_fd instead of the
> actual last field, flags.
>
> Fixes: b5709f6d26d6 ("bpf: Support associating BPF program with struct_ops")
> Signed-off-by: Thiébaud Weksteen <tweek@google.com>
> ---

You need to indicate which tree the patch should go to [1].
bpf tree in this case since this is a fix.

Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>

[1] https://docs.kernel.org/bpf/bpf_devel_QA.html#q-how-do-i-indicate-which-tree-bpf-vs-bpf-next-my-patch-should-be-applied-to

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

end of thread, other threads:[~2026-06-18  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18  4:09 [PATCH] bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check Thiébaud Weksteen
2026-06-18  9:58 ` Jakub Sitnicki

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