ebpf-verifier
ebpf-verifier copied to clipboard
Support for BPF_FETCH in atomic operations
As far as I understand by looking at the following code
https://github.com/vbpf/ebpf-verifier/blob/3ea1b73f68f3fff48afbd0508ca438c3b9a4d614/src/asm_unmarshal.cpp#L218
the verifier currently only supports BPF_ADD
atomic operations, but does not support the BPF_FETCH
modifier, as defined here: https://docs.kernel.org/bpf/instruction-set.html#atomic-operations
Is my understanding correct? Are there plans to add support for BPF_FETCH
?
This can be particularly useful for implementing critical sections.
It is not supported yet, but I believe should be straight forward to implement - atomic arithmetic is largely not different from non-atomic, as far as the verifier is concerned.
Is it possible to get an update on sync_fetch_and_add/lock_xadd support? It is needed for ebpf-for-windows.
@shpalani asked:
Is it possible to get an update on sync_fetch_and_add/lock_xadd support? It is needed for ebpf-for-windows.
Ok, pull request is now ready for review.