lkml.org 
[lkml]   [2022]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH bpf-next] samples/bpf: check detach prog exist or not in xdp_fwd
Date
Zhengchao Shao <shaozhengchao@huawei.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

\
 
 \ /
  Last update: 2022-05-09 11:59    [W:2.847 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site