linux-stable/tools/testing
Yonghong Song 44df171a10 selftests/bpf: Workaround a verifier issue for test exhandler
The llvm patch [1] enabled opaque pointer which caused selftest
'exhandler' failure.
  ...
  ; work = task->task_works;
  7: (79) r1 = *(u64 *)(r6 +2120)       ; R1_w=ptr_callback_head(off=0,imm=0) R6_w=ptr_task_struct(off=0,imm=0)
  ; func = work->func;
  8: (79) r2 = *(u64 *)(r1 +8)          ; R1_w=ptr_callback_head(off=0,imm=0) R2_w=scalar()
  ; if (!work && !func)
  9: (4f) r1 |= r2
  math between ptr_ pointer and register with unbounded min value is not allowed

  below is insn 10 and 11
  10: (55) if r1 != 0 goto +5
  11: (18) r1 = 0 ll
  ...

In llvm, the code generation of 'r1 |= r2' happened in codegen
selectiondag phase due to difference of opaque pointer vs. non-opaque pointer.
Without [1], the related code looks like:
  r2 = *(u64 *)(r6 + 2120)
  r1 = *(u64 *)(r2 + 8)
  if r2 != 0 goto +6 <LBB0_4>
  if r1 != 0 goto +5 <LBB0_4>
  r1 = 0 ll
  ...

I haven't found a good way in llvm to fix this issue. So let us workaround the
problem first so bpf CI won't be blocked.

  [1] https://reviews.llvm.org/D123300

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220419050900.3136024-1-yhs@fb.com
2022-04-19 10:22:19 -07:00
..
cxl tools/testing/cxl: Add a physical_node link 2022-02-08 22:57:33 -08:00
fault-injection
ktest
kunit linux-kselftest-kunit-5.18-rc1 2022-03-23 12:56:39 -07:00
memblock memblock tests: Add TODO and README files 2022-03-10 12:19:44 +02:00
nvdimm nvdimm/region: Delete nd_blk_region infrastructure 2022-03-11 15:53:13 -08:00
radix-tree tools: Move gfp.h and slab.h from radix-tree to lib 2022-02-20 08:44:37 +02:00
scatterlist tools/testing/scatterlist: add missing defines 2022-01-30 09:56:58 +02:00
selftests selftests/bpf: Workaround a verifier issue for test exhandler 2022-04-19 10:22:19 -07:00
vsock af_vsock: SOCK_SEQPACKET broken buffer test 2022-03-18 15:13:19 +00:00