[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pmknyr6b.fsf@toke.dk>
Date: Mon, 09 May 2022 11:46:20 +0200
From: Toke Høiland-Jørgensen <toke@...nel.org>
To: Zhengchao Shao <shaozhengchao@...wei.com>, bpf@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
ast@...nel.org, daniel@...earbox.net, davem@...emloft.net,
kuba@...nel.org, hawk@...nel.org, john.fastabend@...il.com,
andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com,
kpsingh@...nel.org
Cc: weiyongjun1@...wei.com, shaozhengchao@...wei.com,
yuehaibing@...wei.com
Subject: Re: [PATCH bpf-next] samples/bpf: check detach prog exist or not in
xdp_fwd
Zhengchao Shao <shaozhengchao@...wei.com> writes:
> Before detach the prog, we should check detach prog exist or not.
If we're adding such a check we should also check that it's the *right*
program. I.e., query the ID for the program name and check that it
matches what the program attached, then obtain an fd and pass that as
XDP_EXPECTED_FD on detach to make sure it wasn't swapped out in the
meantime...
-Toke
Powered by blists - more mailing lists