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: <dd0d1a41-1d1d-5104-0fa0-42241f5a960c@gmail.com>
Date:   Mon, 2 Nov 2020 08:59:42 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>,
        John Fastabend <john.fastabend@...il.com>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        maze@...gle.com, lmb@...udflare.com, shaun@...era.io,
        Lorenzo Bianconi <lorenzo@...nel.org>, marek@...udflare.com,
        Jakub Kicinski <kuba@...nel.org>, eyal.birger@...il.com
Subject: Re: [PATCH bpf-next V5 2/5] bpf: bpf_fib_lookup return MTU value as
 output when looked up

On 11/2/20 2:28 AM, Jesper Dangaard Brouer wrote:
>>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>>> index e6ceac3f7d62..01b2b17c645a 100644
>>> --- a/include/uapi/linux/bpf.h
>>> +++ b/include/uapi/linux/bpf.h
>>> @@ -2219,6 +2219,9 @@ union bpf_attr {
>>>   *		* > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
>>>   *		  packet is not forwarded or needs assist from full stack
>>>   *
>>> + *		If lookup fails with BPF_FIB_LKUP_RET_FRAG_NEEDED, then the MTU
>>> + *		was exceeded and result params->mtu contains the MTU.
>>> + *  
>>
>> Do we need to hide this behind a flag? It seems otherwise you might confuse
>> users. I imagine on error we could reuse the params arg, but now we changed
>> the tot_len value underneath them?
> 
> The principle behind this bpf_fib_lookup helper, is that params (struct
> bpf_fib_lookup) is used for both input and output (results). Almost
> every field is change after the lookup. (For performance reasons this
> is kept at 64 bytes (cache-line))  Thus, users of this helper already
> expect/knows the contents of params have changed.
> 

yes, that was done on purpose.

Jesper: you should remove the '(if requested check_mtu)' comment in the
documentation. That is an internal flag only -- xdp is true, tc is false.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ