diff options
author | Luke Nelson <lukenels@cs.washington.edu> | 2020-04-18 16:26:54 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-04-20 19:25:30 -0700 |
commit | d2b6c3ab70dbc0069a69c57edd8c96f365f06b7c (patch) | |
tree | f8f4cf01b82216e46db29d51c0d0d86d23a5f34c /tools/lib | |
parent | aee194b14dd2b2bde6252b3acf57d36dccfc743a (diff) | |
download | linux-d2b6c3ab70dbc0069a69c57edd8c96f365f06b7c.tar.bz2 |
bpf, selftests: Add test for BPF_STX BPF_B storing R10
This patch adds a test to test_verifier that writes the lower 8 bits of
R10 (aka FP) using BPF_B to an array map and reads the result back. The
expected behavior is that the result should be the same as first copying
R10 to R9, and then storing / loading the lower 8 bits of R9.
This test catches a bug that was present in the x86-64 JIT that caused
an incorrect encoding for BPF_STX BPF_B when the source operand is R10.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200418232655.23870-2-luke.r.nels@gmail.com
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions