ietf-wg-bpf / ebpf-docs

eBPF Standard Documentation
37 stars 5 forks source link

ISA: appendix definitions of some lock instructions are incorrect #65

Closed dthaler closed 6 months ago

dthaler commented 6 months ago

Section 4.3 says:

If the BPF_FETCH flag is set, then the operation also overwrites src with the value that was in memory before it was modified.

The appendix shows code like:

     *(u32 *)(dst + offset) += src
     src = *(u32 *)(dst + offset)

Which would overwrite src with the value after being modified if read literally.