Thread (6 messages) 6 messages, 2 authors, 2026-01-29

Re: [PATCH bpf-next v3 1/3] bpf: Add bpf_jit_supports_fsession()

From: Leon Hwang <hidden>
Date: 2026-01-29 15:19:36
Also in: bpf, linux-kselftest, lkml

On Thu Jan 29, 2026 at 10:54 PM +08, bot+bpf-ci wrote:
quoted
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index e7ff8394e0..6e0693ac72 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -24874,6 +24874,9 @@ int bpf_check_attach_target(struct bpf_verifier_log *log,
 	case BPF_TRACE_FENTRY:
 	case BPF_TRACE_FEXIT:
 	case BPF_TRACE_FSESSION:
+		if (prog->expected_attach_type == BPF_TRACE_FSESSION &&
+		    !bpf_jit_supports_fsession())
+			return -EOPNOTSUPP;
This isn't a bug, but other similar bpf_jit_supports_*() checks in
this file include a bpf_log() message before returning an error. For
example:

  bpf_jit_supports_kfunc_call() -> "JIT does not support calling kernel function"
  bpf_jit_supports_exceptions() -> "JIT does not support calling kfunc..."
  bpf_jit_supports_arena()      -> "JIT doesn't support arena"
  bpf_jit_supports_private_stack() -> "Private stack not supported by jit"

Should this check also include a message like "JIT does not support
fsession" for consistency with other similar checks in the verifier?
That makes sense.

Let me add the log message.

Thanks,
Leon

---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/21482297342

AI-authorship-score: low
AI-authorship-explanation: The commit demonstrates specific debugging context with actual test output and errno values, correct understanding of kernel BPF conventions, and follows established patterns - typical of experienced human kernel developers.
issues-found: 1
issue-severity-score: low
issue-severity-explanation: Minor consistency issue - missing bpf_log() error message compared to similar checks in the same file; does not affect functionality or stability.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help