diff options
author | John Fastabend <john.fastabend@gmail.com> | 2020-08-11 15:05:33 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-08-13 22:40:43 +0200 |
commit | 8e0c1517565f06027b68caf2875620ddf6914eee (patch) | |
tree | 051e08414da75fce447096328062eb773690fd14 /Documentation/bpf/index.rst | |
parent | 86ed4be68fdee23df4843a59f91c1ac7fc05e860 (diff) | |
download | linux-next-8e0c1517565f06027b68caf2875620ddf6914eee.tar.gz |
bpf, selftests: Add tests for sock_ops load with r9, r8.r7 registers
Loads in sock_ops case when using high registers requires extra logic to
ensure the correct temporary value is used. We need to ensure the temp
register does not use either the src_reg or dst_reg. Lets add an asm
test to force the logic is triggered.
The xlated code is here,
30: (7b) *(u64 *)(r9 +32) = r7
31: (61) r7 = *(u32 *)(r9 +28)
32: (15) if r7 == 0x0 goto pc+2
33: (79) r7 = *(u64 *)(r9 +0)
34: (63) *(u32 *)(r7 +916) = r8
35: (79) r7 = *(u64 *)(r9 +32)
Notice r9 and r8 are not used for temp registers and r7 is chosen.
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/159718353345.4728.8805043614257933227.stgit@john-Precision-5820-Tower
Diffstat (limited to 'Documentation/bpf/index.rst')
0 files changed, 0 insertions, 0 deletions