• Daniel Borkmann's avatar
    bpf, selftests: Update test case for atomic cmpxchg on r0 with pointer · e523102c
    Daniel Borkmann authored
    Fix up unprivileged test case results for 'Dest pointer in r0' verifier tests
    given they now need to reject R0 containing a pointer value, and add a couple
    of new related ones with 32bit cmpxchg as well.
    
      root@foo:~/bpf/tools/testing/selftests/bpf# ./test_verifier
      #0/u invalid and of negative number OK
      #0/p invalid and of negative number OK
      [...]
      #1268/p XDP pkt read, pkt_meta' <= pkt_data, bad access 1 OK
      #1269/p XDP pkt read, pkt_meta' <= pkt_data, bad access 2 OK
      #1270/p XDP pkt read, pkt_data <= pkt_meta', good access OK
      #1271/p XDP pkt read, pkt_data <= pkt_meta', bad access 1 OK
      #1272/p XDP pkt read, pkt_data <= pkt_meta', bad access 2 OK
      Summary: 1900 PASSED, 0 SKIPPED, 0 FAILED
    Acked-by: default avatarBrendan Jackman <jackmanb@google.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    e523102c
atomic_cmpxchg.c 6.78 KB