]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Add bpf_jit_supports_fsession()
authorLeon Hwang <leon.hwang@linux.dev>
Sat, 31 Jan 2026 14:49:48 +0000 (22:49 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 31 Jan 2026 21:51:04 +0000 (13:51 -0800)
commit8798902f2b8bcae6f90229a1a1496b48ddda2972
tree6e0352a44fec38c2d0f430dd9ab3ddbb7aab9ddf
parentf0b5b3d6b56f8717e255406366d81bbcd3631660
bpf: Add bpf_jit_supports_fsession()

The added fsession does not prevent running on those architectures, that
haven't added fsession support.

For example, try to run fsession tests on arm64:

test_fsession_basic:PASS:fsession_test__open_and_load 0 nsec
test_fsession_basic:PASS:fsession_attach 0 nsec
check_result:FAIL:test_run_opts err unexpected error: -14 (errno 14)

In order to prevent such errors, add bpf_jit_supports_fsession() to guard
those architectures.

Fixes: 2d419c44658f ("bpf: add fsession support")
Acked-by: Puranjay Mohan <puranjay@kernel.org>
Tested-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20260131144950.16294-2-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c
include/linux/filter.h
kernel/bpf/core.c
kernel/bpf/verifier.c
tools/testing/selftests/bpf/prog_tests/fsession_test.c