Re: [PATCH bpf-next 5/6] selftests/bpf: Add arena fault test for load-acquire

Daniel Borkmann <[email protected]>
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
On 8/6/26 4:39 PM, Daniel Borkmann wrote:
> Add stream_arena_load_acquire_fault, which performs a load-acquire from an
> unmapped arena address, next to the existing read and write fault tests.
> 
> The test covers both halves of the JIT bug that treated a load-acquire as
> a store when populating its exception table entry:
> 
>    - the fault has to be reported as a READ, and at the address held by
>      the source register, which __stderr() and test_address() check, and
>    - the destination register has to be cleared by the fault handler,
>      which the program checks by poisoning it before the load-acquire
>      and returning it, so __retval(0) fails if it is left untouched
> 
>    # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t stream_arena_fault_address
>    [...]
>    #462/1   stream_arena_fault_address/read_fault:OK
>    #462/2   stream_arena_fault_address/write_fault:OK
>    #462/3   stream_arena_fault_address/load_acquire_fault:OK
>    #462     stream_arena_fault_address:OK
>    Summary: 1/3 PASSED, 0 SKIPPED, 0 FAILED
> 
> Signed-off-by: Daniel Borkmann <[email protected]>
(will push a v2 given this one fails on s390 due to encoding)
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.