Re: [PATCH bpf-next v2] bpftool: Clear errno after libcap's checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@xxxxxxxxxxxxx>:

On Mon, 15 Aug 2022 17:22:05 +0100 you wrote:
> When bpftool is linked against libcap, the library runs a "constructor"
> function to compute the number of capabilities of the running kernel
> [0], at the beginning of the execution of the program. As part of this,
> it performs multiple calls to prctl(). Some of these may fail, and set
> errno to a non-zero value:
> 
>     # strace -e prctl ./bpftool version
>     prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE) = 1
>     prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
>     prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = 1
>     prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument)
>     prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument)
>     prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument)
>     ** fprintf added at the top of main(): we have errno == 1
>     ./bpftool v7.0.0
>     using libbpf v1.0
>     features: libbfd, libbpf_strict, skeletons
>     +++ exited with 0 +++
> 
> [...]

Here is the summary with links:
  - [bpf-next,v2] bpftool: Clear errno after libcap's checks
    https://git.kernel.org/bpf/bpf-next/c/cea558855c39

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux