Re: [PATCH bpf-next v3 5/6] selftests/bpf: Verify load-time signed loader metadata

Daniel Borkmann <[email protected]>
Newsgroups org.kernel.vger.linux-security-module,org.kernel.vger.bpf
Message-ID <[email protected]>
On 7/2/26 5:17 PM, [email protected] wrote:
[...]
>> +cleanup:
>> +	if (btf)
>> +		btf__free(btf);
>> +	if (map_fd >= 0)
>> +		close(map_fd);
> 
> This isn't a bug, but was map_fd meant to be dropped from this test?
> It's initialized to -1 and never changed, so the cleanup branch is
> unreachable. The sibling tests signed_map_by_fd_rejected and
> signed_sparse_fd_array_rejected create and close a map_fd, but
> signed_module_kfunc_rejected only uses BTF fds and never assigns
> map_fd.
Ack, will clean up in a v4.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.