Re: [PATCH bpf-next 2/2] selftests/bpf: Add tests for bpf_sockopt is_compat field

[email protected]
Newsgroups gmane.linux.kernel.bpf,gmane.linux.network,gmane.linux.kernel
Message-ID <c5481925e539bd3a00343eb765e1f50ea99d0878c7ca3858d68d460b7076c95f@mail.kernel.org>
> selftests/bpf: Add tests for bpf_sockopt is_compat field
>
> Sync tools/include/uapi/linux/bpf.h with the addition of the 'is_compat'
> field in 'struct bpf_sockopt' and add test cases to 'prog_tests/sockopt.c'
> to verify context access permissions:
>
>  - Test reading 'ctx->is_compat' in 'cgroup/{g,s}etsockopt'
>    (expecting 0 in native execution).
>  - Check verifier rejects writes to 'ctx->is_compat'
>    in 'cgroup/{g,s}etsockopt'.
>
> Tested via:
>   tools/testing/selftests/bpf/vmtest.sh -- ./test_progs -t sockopt

This isn't a bug, but would it be worth separating the 'Tested via:'
line with a blank line and saying explicitly that the compat==1 path is
not reachable from a native test_progs build, so readers know what the
new cases do and do not cover?


---
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/31696027015
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.