gobpf
gobpf copied to clipboard
"BPF_STX uses reserved fields" validation error when using __sync_lock_test_and_set
Hi, in an eBPF program that i'm loading with gobpf I need to perform atomic increments and atomic set. For the first, I use __sync_fetch_and_add
with no issues, however if I try to use __sync_lock_test_and_set
for the latter, while compilation passes, I get a runtime error from the validator:
BPF_STX uses reserved fields
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
How do I perform atomic set of a variable so that i don't have to use PER_CPU arrays?
eBPF program compiled with clang 12.0.1, running on 5.8.0-53-generic ( x86_64 )
@evilsocket any updates on this? did you find the problem?
@sarsanaee nope, i've since migrated to https://github.com/aya-rs/aya