Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscalls: do not conceal BPF_PROG_* syscall errors
The error wrapping code for BPF_PROG_* syscall-related errors would mask the true source of all underlying syscall errors, which meant that you couldn't detect several fairly important cases (such as -EACESS and -EPERM). It seems that this behaviour wasn't intentional (prior to commit de57e91, the behaviour was to bubble up the syscall error) and the similar wrapping of BPF_MAP_* errors did bubble up the syscall error too. This is needed for runc to be able to detect permission errors due to SELinux labels blocking certain operations (mainly NewProgramFromID), and unifies the behaviour for BPF_PROG_* and BPF_MAP_* syscalls. It turns out that wrapMapError doesn't actually wrap the either error, but lmb said they will come up with a better long term solution, so leave this alone for now. Fixes: de57e91 ("Add *GetNextID") Signed-off-by: Aleksa Sarai <[email protected]>
- Loading branch information