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]
Date:   Mon, 31 Aug 2020 17:28:52 -0600
From:   David Ahern <dsahern@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org, yhs@...com
Subject: Re: [PATCH bpf] bpf: refer to struct xdp_md in user space comments

On 8/31/20 4:43 PM, Jakub Kicinski wrote:
> On Thu, 20 Aug 2020 16:16:47 +0200 Daniel Borkmann wrote:
>> On 8/19/20 9:27 PM, Jakub Kicinski wrote:
>>> uAPI uses xdp_md, not xdp_buff. Fix comments.
>>>
>>> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
>>> ---
>>>   include/uapi/linux/bpf.h | 8 ++++----
>>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>>> index 0480f893facd..cc3553a102d0 100644
>>> --- a/include/uapi/linux/bpf.h
>>> +++ b/include/uapi/linux/bpf.h
>>> @@ -1554,7 +1554,7 @@ union bpf_attr {  
>>
>> Needs also tooling header copy, but once that is done, it needs fixup for libbpf:
>>
>> [root@...9 bpf]# make
>>    GEN      bpf_helper_defs.h
>> Unrecognized type 'struct xdp_md', please add it to known types!
>> make[1]: *** [Makefile:186: bpf_helper_defs.h] Error 1
>> make[1]: *** Deleting file 'bpf_helper_defs.h'
>> make: *** [Makefile:160: all] Error 2
>> [root@...9 bpf]#
>>
>> Pls fix up and send v2, thanks.
> 
> FWIW upon closer inspection it appears that this is intentional
> (even if confusing) and bpf_helpers_doc.py swaps the types to 
> __sk_buff and xdp_md when generating man pages and the header.
> 

I liked the direction of fixing the uapi file. Is there a legit reason
to have the documentation in uapi/linux/bpf.h to reference a struct that
is not part of the uapi?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ