Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"BPF_STX uses reserved fields" validation error when using __sync_lock_test_and_set #296

Open
evilsocket opened this issue May 28, 2021 · 2 comments

Comments

@evilsocket
Copy link

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 )

@sarsanaee
Copy link

sarsanaee commented Jul 13, 2022

@evilsocket any updates on this? did you find the problem?

@evilsocket
Copy link
Author

@sarsanaee nope, i've since migrated to https://github.com/aya-rs/aya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants