Skip to content

[eBPF interpreter] Atomic test lead to a crash #157

@shahab-vahedi

Description

@shahab-vahedi

While testing the support of eBPF JIT in ARCv2, I noticed that (64-bit) atomic tests, handled by the interpreter, lead to an assert in QEMU (haven't tried this on HSDK recently):

archs-lnx# mount -t debugfs debugfs /sys/kernel/debug
archs-lnx# sysctl net.core.bpf_jit_enable
           net.core.bpf_jit_enable=0
archs-lnx# insmod test_bpf.ko test_id=327

qemu-system-arc: /src/qemu/target/arc/op_helper.c:185:
  helper_llockd: Assertion `(addr & 0x7) == 0' failed.

For a full list of the tests, see the attached patch that disables them.
ebpf_disable_atomic_tests.tar.gz

This has been observed both in kernel 5.x and 6.x. I do not want to bombard this thread with hoard of information. If more details of the environment is needed, I can provide it.

EDIT:
reproduce.tar.gz

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions