1================== 2BPF Selftest Notes 3================== 4General instructions on running selftests can be found in 5`Documentation/bpf/bpf_devel_QA.rst`_. 6 7Additional information about selftest failures are 8documented here. 9 10bpf_iter test failures with clang/llvm 10.0.0 11============================================= 12 13With clang/llvm 10.0.0, the following two bpf_iter tests failed: 14 * ``bpf_iter/ipv6_route`` 15 * ``bpf_iter/netlink`` 16 17The symptom for ``bpf_iter/ipv6_route`` looks like 18 19.. code-block:: c 20 21 2: (79) r8 = *(u64 *)(r1 +8) 22 ... 23 14: (bf) r2 = r8 24 15: (0f) r2 += r1 25 ; BPF_SEQ_PRINTF(seq, "%pi6 %02x ", &rt->fib6_dst.addr, rt->fib6_dst.plen); 26 16: (7b) *(u64 *)(r8 +64) = r2 27 only read is supported 28 29The symptom for ``bpf_iter/netlink`` looks like 30 31.. code-block:: c 32 33 ; struct netlink_sock *nlk = ctx->sk; 34 2: (79) r7 = *(u64 *)(r1 +8) 35 ... 36 15: (bf) r2 = r7 37 16: (0f) r2 += r1 38 ; BPF_SEQ_PRINTF(seq, "%pK %-3d ", s, s->sk_protocol); 39 17: (7b) *(u64 *)(r7 +0) = r2 40 only read is supported 41 42This is due to a llvm BPF backend bug. The fix 43 https://reviews.llvm.org/D78466 44has been pushed to llvm 10.x release branch and will be 45available in 10.0.1. The fix is available in llvm 11.0.0 trunk. 46