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: <CAJ+HfNifrVytXVvVfJ5Nr0JKwtg9vho5NKf9ciNgJzxZhQ-rsg@mail.gmail.com>
Date:   Fri, 6 Nov 2020 09:22:14 +0100
From:   Björn Töpel <bjorn.topel@...il.com>
To:     Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc:     Netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>
Subject: Re: [PATCH] xdp: auto off xdp by bond fd

On Fri, 6 Nov 2020 at 08:41, Xuan Zhuo <xuanzhuo@...ux.alibaba.com> wrote:
>
> By default, off xdp is implemented by actively calling netlink on the
> command line or in the program. This is very inconvenient for apps based
> on xdp. For example, an app based on xdp + xsk exits abnormally, but xdp
> is still working, which may cause some exceptions. And xsk cannot be
> automatically recycled. We need to bind xdp to the process in some
> cases, so that xdp can always be automatically released when the process exits.
>
> Although the signal can be used to handle this problem, it cannot handle
> some signals that cannot be captured. At the same time, it is
> inconvenient to use the signal to process in some cases. For example, a
> library based on xdp + xsk is not very convenient to use the signal solve
> this problem.
>
> This patch requires the app to actively call RTM_GETLINK after setting
> xdp and use RTEXT_FILTER_XDPFD flags to let the kernel generate an fd,
> and return it to the app through netlink. In this way, when the app
> closes fd or the process exits, the release callback of fd can trigger
> to off xdp.
>

Hi Xuan,

You'd like a "process scoped XDP attachment", right? I believe the
mechanism you're looking for is Andrii's bpf_link. Have look at commit
aa8d3a716b59 ("bpf, xdp: Add bpf_link-based XDP attachment API").


Cheers,
Björn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ