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-next>] [day] [month] [year] [list]
Date:   Tue, 28 Sep 2021 22:13:45 +0800
From:   Hou Tao <houtao1@...wei.com>
To:     Martin KaFai Lau <kafai@...com>
CC:     <netdev@...r.kernel.org>, <bpf@...r.kernel.org>
Subject: Question about the release of BPF_MAP_TYPE_STRUCT_OPS fd

Hi Martin,

During the testing of bpf_tcp_ca, I found that if the test program
aborts before calling bpf_link__detach_struct_ops(), the registered
bpf_dctcp will not be unregistered, and running bpf_tcp_ca test again
will fail with -EEXIST error as shown below:

test_dctcp:PASS:bpf_dctcp__open_and_load 0 nsec
test_dctcp:FAIL:bpf_map__attach_struct_ops unexpected error: -17

The root cause is that the release of BPF_MAP_TYPE_STRUCT_OPS fd
neither put struct_ops programs in maps nor unregister the struct_ops
from kernel. Was the implementation intentional, or was it an oversight ?
If it is an oversight, I will post a patch to fix it.

Regards,
Tao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ