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] [day] [month] [year] [list]
Message-ID: <be6d2eea-6026-ab1f-2200-443a35d66762@fb.com>
Date:   Wed, 6 Nov 2019 22:02:28 +0000
From:   Yonghong Song <yhs@...com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.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 11/6/19 1:58 PM, Alexei Starovoitov wrote:
> 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.

Sorry, forgot to do. Will remember next time.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ