lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+EHbJ950L93Wa4ZxJDQ_PvPwv-re9+95GighudmN3iDQ@mail.gmail.com>
Date:   Wed, 6 Nov 2019 13:58:22 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Yonghong Song <yhs@...com>
Cc:     Andrii Nakryiko <andriin@...com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH bpf-next] libbpf: simplify BPF_CORE_READ_BITFIELD_PROBED usage

On Wed, Nov 6, 2019 at 1:21 PM Yonghong Song <yhs@...com> wrote:
>
>
>
> On 11/6/19 12:15 PM, Andrii Nakryiko wrote:
> > Streamline BPF_CORE_READ_BITFIELD_PROBED interface to follow
> > BPF_CORE_READ_BITFIELD (direct) and BPF_CORE_READ, in general, i.e., just
> > return read result or 0, if underlying bpf_probe_read() failed.
> >
> > In practice, real applications rarely check bpf_probe_read() result, because
> > it has to always work or otherwise it's a bug. So propagating internal
> > bpf_probe_read() error from this macro hurts usability without providing real
> > benefits in practice. This patch fixes the issue and simplifies usage,
> > noticeable even in selftest itself.
>
> Agreed. This will be consistent with direct read where
> returning value will be 0 if any fault happens.
>
> In really rare cases, if user want to distinguish good value 0 from
> bpf_probe_read() returning error, all building macros are in the header
> file, user can have a custom solution. But let us have API work
> for common use case with good usability.
>
> >
> > Cc: Yonghong Song <yhs@...com>
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
>
> Acked-by: Yonghong Song <yhs@...com>

Applied. Thanks

Yonghong, please trim your replies.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ