Closed
Description
Describe the bug
The efW libbpf shim uses the convention of returning -1
and setting errno
. Upstream libbpf returns errno directly from most functions, except when returning a pointer. See https://libbpf.readthedocs.io/en/latest/api.html
This problem extends to the bpf()
syscall wrapper, which doesn't follow Linux ABI for this reason. See https://man7.org/linux/man-pages/man2/bpf.2.html
OS information
No response
Steps taken to reproduce bug
Call a libbpf function and inspect the return code.
Expected behavior
errno
should not be modified, and errors returned according to upstream behaviour.
Actual outcome
errno
is modified and -1
returned.
Additional details
No response