]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/tests: Add test of LDX_MEM with operand aliasing
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fri, 1 Oct 2021 13:03:48 +0000 (15:03 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Oct 2021 15:04:26 +0000 (17:04 +0200)
commita83e1d1d7dd7ace9a6cc168d3df24b1a2f028d40
tree7f6955897ae8836d68b6a8f91ed100fb7c33490c
parentf1662b02370b7b36400f1a155d6096c3ec0ebadd
bpf/tests: Add test of LDX_MEM with operand aliasing

This patch adds a set of tests of BPF_LDX_MEM where both operand registers
are the same register. Mainly testing 32-bit JITs that may load a 64-bit
value in two 32-bit loads, and must not overwrite the address register.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211001130348.3670534-11-johan.almbladh@anyfinetworks.com
lib/test_bpf.c