Re: [PATCH bpf-next v2 5/6] selftests/bpf: Add tests for pointer type merge at a shared load

Eduard Zingerman <[email protected]>
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
On Fri, 2026-08-14 at 23:52 +0200, Daniel Borkmann wrote:
> Cover the ways in which the type recorded for a shared load used to lose
> the BPF_PROBE_MEM rewrite which would then trigger a NULL deref if not
> handled properly.
> 
>   # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t mem_rdonly_untrusted
>   [...]
>   #238/1   mem_rdonly_untrusted/btf_id_to_ptr_mem:OK
>   #238/2   mem_rdonly_untrusted/ldx_is_ok_bad_addr:OK
>   #238/3   mem_rdonly_untrusted/ldx_is_ok_good_addr:OK
>   #238/4   mem_rdonly_untrusted/offset_not_tracked:OK
>   #238/5   mem_rdonly_untrusted/stx_not_ok:OK
>   #238/6   mem_rdonly_untrusted/atomic_not_ok:OK
>   #238/7   mem_rdonly_untrusted/atomic_rmw_not_ok:OK
>   #238/8   mem_rdonly_untrusted/kfunc_param_not_ok:OK
>   #238/9   mem_rdonly_untrusted/mixed_mem_type:OK
>   #238/10  mem_rdonly_untrusted/mixed_mem_untrusted_btf_id_type:OK
>   #238/11  mem_rdonly_untrusted/mixed_mem_btf_id_type:OK
>   #238/12  mem_rdonly_untrusted/mixed_rdonly_mem_btf_id_type:OK
>   #238/13  mem_rdonly_untrusted/mixed_mem_mem_type:OK
>   #238/14  mem_rdonly_untrusted/mixed_map_value_mem_type:OK
>   #238/15  mem_rdonly_untrusted/mixed_stack_mem_type:OK
>   #238/16  mem_rdonly_untrusted/diff_size_access:OK
>   #238/17  mem_rdonly_untrusted/misaligned_access:OK
>   #238/18  mem_rdonly_untrusted/null_check:OK
>   #238/19  mem_rdonly_untrusted/ldx_is_ok_commuted_addr:OK
>   #238/20  mem_rdonly_untrusted/helper_param_not_ok:OK
>   #238     mem_rdonly_untrusted:OK
>   Summary: 1/20 PASSED, 0 SKIPPED, 0/0 FAILED
> 
> Signed-off-by: Daniel Borkmann <[email protected]>
> ---

Hi Daniel,

GCC-BPF fails for the series [1]: because of the difference in
codegen some __msg patterns do not match. How would you like to handle
this, land first 4 patches and do the tests as a follow-up or as a v3?

[1] https://github.com/kernel-patches/bpf/actions/runs/31970050902/job/95222785689

...
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.