[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8736a376ot.fsf@toke.dk>
Date: Fri, 20 Mar 2020 09:48:34 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Yonghong Song <yhs@...com>, Alexei Starovoitov <ast@...nel.org>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>,
Andrii Nakryiko <andriin@...com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <brouer@...hat.com>,
John Fastabend <john.fastabend@...il.com>,
Lorenz Bauer <lmb@...udflare.com>,
Andrey Ignatov <rdna@...com>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next 1/4] xdp: Support specifying expected existing program when attaching XDP
Yonghong Song <yhs@...com> writes:
> On 3/19/20 6:13 AM, Toke Høiland-Jørgensen wrote:
>> From: Toke Høiland-Jørgensen <toke@...hat.com>
>>
>> While it is currently possible for userspace to specify that an existing
>> XDP program should not be replaced when attaching to an interface, there is
>> no mechanism to safely replace a specific XDP program with another.
>>
>> This patch adds a new netlink attribute, IFLA_XDP_EXPECTED_FD, which can be
>> set along with IFLA_XDP_FD. If set, the kernel will check that the program
>> currently loaded on the interface matches the expected one, and fail the
>> operation if it does not. This corresponds to a 'cmpxchg' memory operation.
>
> The patch set itself looks good to me. But previously there is a
> discussion regarding a potential similar functionality through bpf_link.
> I guess maintainers (Alexei and Daniel) need to weigh in as some
> future vision is involved.
Right, sure. See my reply to Jakub for why I went ahead with this
anyway.
-Toke
Powered by blists - more mailing lists