Alan-Jowett / bpf_conformance

Measures the conformance of a BPF runtime to the ISA.
Other
25 stars 14 forks source link

JSET test with different execution results #292

Open RaoNikitha opened 1 month ago

RaoNikitha commented 1 month ago

bpf2c, libbpf and uBPF plugins exhibit different behaviors on the following test containing JSET.

Test: JSET with the same src, dst register

-- asm
mov %r1, 5
jset %r1, %r1, lbl1
mov %r0, 0
exit
lbl1: mov %r0, 1
exit
-- result
0x1

Test execution outcome across three different plugins:

bpf2c: seems like it does not execute instruction at lbl1

FAIL: Plugin returned incorrect return value 0 expected 1

libbpf: verifier error

ERROR: Plugin returned error code 1

uBPF: appears to execute instruction at lbl1

FAIL: Plugin returned incorrect return value 7ffff338a820 expected 1