[SRU Bionic 0/4] BPF tests on i386
Thadeu Lima de Souza Cascardo
cascardo at canonical.com
Fri Oct 29 20:36:20 UTC 2021
These two bugs are related to BPF tests on i386.
The first one requires a change on how some narrow/unaligned context access
is allowed. It could lead to BPF programs causing processor exceptions on
some architectures, though it shouldn't.
The second one only changes the tests. I verified at least i386 and amd64,
and they are all fine there.
The second bug required a lot of backport, because we didn't want to
required kernel BPF verifier changes that could introduce regressions, or
worse, potential vulnerabilities because of incomplete backports.
Those would be:
commit cc8b0b92a1699bc32f7fec71daa2bfc90de43a4d "bpf: introduce function
calls (function boundaries)", which would open a big can of worms we don't
want to do.
commit 5e581dad4fec0e6d062740dc35b8dc248b39d224 "bpf: make unknown opcode
handling more robust". Though it might add more robustness, it changes the
table in the interpreter, so I decided not to backport it now, and fixup
the error messages in test_verifier, instead.
Alexei Starovoitov (1):
selftests/bpf: make test_verifier run most programs
Daniel Borkmann (3):
bpf: add couple of test cases for div/mod by zero
bpf: add further test cases around div/mod and others
bpf: fix context access in tracing progs on 32 bit archs
include/linux/filter.h | 30 +-
kernel/bpf/verifier.c | 3 +-
kernel/trace/bpf_trace.c | 10 +-
lib/test_bpf.c | 8 +-
tools/testing/selftests/bpf/test_verifier.c | 358 +++++++++++++++++++-
5 files changed, 397 insertions(+), 12 deletions(-)
More information about the kernel-team