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: <f9c85578b94a4a38b3f7b9c796810a30@huawei.com>
Date:   Mon, 9 May 2022 10:27:22 +0000
From:   shaozhengchao <shaozhengchao@...wei.com>
To:     Toke Høiland-Jørgensen <toke@...nel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "hawk@...nel.org" <hawk@...nel.org>,
        "john.fastabend@...il.com" <john.fastabend@...il.com>,
        "andrii@...nel.org" <andrii@...nel.org>,
        "kafai@...com" <kafai@...com>,
        "songliubraving@...com" <songliubraving@...com>,
        "yhs@...com" <yhs@...com>,
        "kpsingh@...nel.org" <kpsingh@...nel.org>
CC:     "weiyongjun (A)" <weiyongjun1@...wei.com>,
        yuehaibing <yuehaibing@...wei.com>
Subject: 答复: [PATCH bpf-next] samples/bpf: check detach prog exist or not in xdp_fwd


-----邮件原件-----
发件人: Toke Høiland-Jørgensen [mailto:toke@...nel.org] 
发送时间: 2022年5月9日 17:46
收件人: shaozhengchao <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
抄送: weiyongjun (A) <weiyongjun1@...wei.com>; shaozhengchao <shaozhengchao@...wei.com>; yuehaibing <yuehaibing@...wei.com>
主题: 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

Thank you for your reply. When finish running xdp_fwd to attatch prog, the program will exit and can't store fd as XDP_EXPECTED_FD. 

I think the sample xdp_fwd -d is just detach prog and don't care if the fd is expected.

-zhengchao shao 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ