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: <20221208173053.1145a8cb@kernel.org>
Date:   Thu, 8 Dec 2022 17:30:53 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Stanislav Fomichev <sdf@...gle.com>
Cc:     bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
        andrii@...nel.org, martin.lau@...ux.dev, song@...nel.org,
        yhs@...com, john.fastabend@...il.com, kpsingh@...nel.org,
        haoluo@...gle.com, jolsa@...nel.org,
        David Ahern <dsahern@...il.com>,
        Willem de Bruijn <willemb@...gle.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Anatoly Burakov <anatoly.burakov@...el.com>,
        Alexander Lobakin <alexandr.lobakin@...el.com>,
        Magnus Karlsson <magnus.karlsson@...il.com>,
        Maryam Tahhan <mtahhan@...hat.com>, xdp-hints@...-project.net,
        netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 03/12] bpf: XDP metadata RX kfuncs

On Thu, 8 Dec 2022 11:07:43 -0800 Stanislav Fomichev wrote:
> > >       bpf_free_used_maps(aux);
> > >       bpf_free_used_btfs(aux);
> > > -     if (bpf_prog_is_offloaded(aux))
> > > +     if (bpf_prog_is_dev_bound(aux))
> > >               bpf_prog_offload_destroy(aux->prog);  
> >
> > This also looks a touch like a mix of terms (condition vs function
> > called).  
> 
> Here, not sure, open to suggestions. These
> bpf_prog_offload_init/bpf_prog_offload_destroy are generic enough
> (now) that I'm calling them for both dev_bound/offloaded.
> 
> The following paths trigger for both offloaded/dev_bound cases:
> 
> if (bpf_prog_is_dev_bound()) bpf_prog_offload_init();
> if (bpf_prog_is_dev_bound()) bpf_prog_offload_destroy();
> 
> Do you think it's worth it having completely separate
> dev_bound/offloaded paths? Or, alternatively, can rename to
> bpf_prog_dev_bound_{init,destroy} but still handle both cases?

Any offload should be bound, right? So I think functions which handle
both can use the bound naming scheme, only the offload-specific ones 
should explicitly use offload?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ