ietf-wg-bpf / ebpf-docs

eBPF Standard Documentation
37 stars 5 forks source link

ISA: Clarify BPF_NEG operation #74

Closed dthaler closed 4 months ago

dthaler commented 5 months ago

The doc doesn't clearly say whether BPF_X or BPF_K should be used with BPF_NEG.

https://man.freebsd.org/cgi/man.cgi?bpf seems to imply it should be 0 (BPF_K) I believe Linux has the same restriction per the self test at https://elixir.bootlin.com/linux/latest/source/tools/testing/selftests/bpf/verifier/jmp32.c#L880

dthaler commented 5 months ago

Fix proposed in https://mailarchive.ietf.org/arch/msg/bpf/y6SpFG1-y0G09lW-Ib5BbTf0jHo/

dthaler commented 4 months ago

Fixed in draft -01