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: <20210929104856.2d3f15e7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 29 Sep 2021 10:48:56 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     Lorenz Bauer <lmb@...udflare.com>,
        John Fastabend <john.fastabend@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        Lorenzo Bianconi <lorenzo.bianconi@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>, shayagr@...zon.com,
        David Ahern <dsahern@...nel.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Eelco Chaudron <echaudro@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Alexander Duyck <alexander.duyck@...il.com>,
        Saeed Mahameed <saeed@...nel.org>,
        "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        tirthendu.sarkar@...el.com
Subject: Re: [PATCH v14 bpf-next 00/18] mvneta: introduce XDP multi-buffer
 support

On Wed, 29 Sep 2021 14:25:09 +0200 Toke Høiland-Jørgensen wrote:
> >> I guess we could play some trickery with stuffing offset/len/flags into
> >> one or two u64s to save an argument or two?  
> >
> > Adding another pointer arg seems really hard to explain as an API.
> > What happens if I pass the "wrong" ptr? What happens if I pass NULL?
> >
> > How about this: instead of taking stack_ptr, take the return value
> > from header_pointer as an argument.  
> 
> Hmm, that's a good point; I do think that passing the return value from
> header pointer is more natural as well (you're flushing pointer you just
> wrote to, after all).

It is more natural but doesn't allow for the same level of optimization.
Wouldn't consistent naming obviate the semantics?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ