BPF_[AND|OR|XOR|FETCH|XCHG|CMPXCHG] in net:test_bpf.sh from ubuntu_kernel_selftests failed on K-5.19 P9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Po-Hsu Lin |
Bug Description
[Impact]
The BPF_AND, BPF_OR, BPF_XOR, BPF_FETCH, BPF_XCHG and BPF_CMPXCHG related tests will fail in net:test_bpf test from ubuntu_
test_bpf: #361 BPF_ATOMIC | BPF_W, BPF_AND: Test: 0x12 & 0xab = 0x02
eBPF filter atomic op code c3 (@3) unsupported
FAIL to select_runtime err=-524
...
test_bpf: #365 BPF_ATOMIC | BPF_W, BPF_AND | BPF_FETCH: Test: 0x12 & 0xab = 0x02
eBPF filter atomic op code c3 (@3) unsupported
FAIL to select_runtime err=-524
...
test_bpf: #377 BPF_ATOMIC | BPF_W, BPF_OR: Test: 0x12 | 0xab = 0xbb FAIL to select_runtime err=-524
...
test_bpf: #393 BPF_ATOMIC | BPF_W, BPF_XOR: Test: 0x12 ^ 0xab = 0xb9 FAIL to select_runtime err=-524
...
test_bpf: #409 BPF_ATOMIC | BPF_W, BPF_XCHG: Test: 0x12 xchg 0xab = 0xab
eBPF filter atomic op code c3 (@3) unsupported
FAIL to select_runtime err=-524
...
test_bpf: #417 BPF_ATOMIC | BPF_W, BPF_CMPXCHG: Test successful return
eBPF filter atomic op code c3 (@3) unsupported
FAIL to select_runtime err=-524
...
test_bpf: Summary: 894 PASSED, 132 FAILED, [882/882 JIT'ed]
Please find attachment for the complete test log.
[Fix]
* 6511270911 powerpc/bpf/64: add support for BPF_ATOMIC bitwise operations
* dbe6e2456f powerpc/bpf/64: add support for atomic fetch operations
* 1e82dfaa78 powerpc/bpf/64: Add instructions for atomic_[cmp]xchg
These patches can be cherry-picked into Kinetic kernel.
[Test]
Test kernel can be found here:
https:/
Steps:
1. Reboot with the patched kernel
2. Run:
sudo dmesg -C
sudo modprobe test_bpf
sudo dmesg
Tested with Power9 node baltar, with the patched kernel there will be no failure reported by the test_bpf:
test_bpf: Summary: 1026 PASSED, 0 FAILED, [1014/1014 JIT'ed]
[Where problems could occur]
This patchset just broaden the BPF operations support on ppc64, we might see some new failures when using these instruction somewhere in the future.
Cascardo: The existing atomic operations may regress as well, since they now produce different code.
description: | updated |
Changed in linux (Ubuntu Kinetic): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in linux (Ubuntu Kinetic): | |
status: | New → In Progress |
Changed in linux (Ubuntu): | |
status: | New → Fix Released |
description: | updated |
Changed in linux (Ubuntu Kinetic): | |
status: | In Progress → Fix Committed |
Complete test log for the test_bpf failure.