Thread (16 messages) 16 messages, 3 authors, 2026-01-26

Re: [PATCH bpf-next v7 2/9] libbpf: Add support for extended bpf syscall

From: Alexei Starovoitov <hidden>
Date: 2026-01-23 04:12:59
Also in: bpf, linux-kselftest, lkml

On Thu, Jan 22, 2026 at 8:07 PM Leon Hwang [off-list ref] wrote:


On 23/1/26 11:55, Alexei Starovoitov wrote:
quoted
On Thu, Jan 22, 2026 at 7:25 PM Leon Hwang [off-list ref] wrote:
quoted

+static int probe_bpf_syscall_common_attrs(int token_fd)
+{
+       int ret;
+
+       ret = probe_sys_bpf_ext();
+       return ret > 0;
+}
When you look at the above, what thoughts come to mind?

... and please don't use ai for answers.
My initial thought was whether probe_fd() is needed here to handle and
close a returned fd, since the return value of probe_sys_bpf_ext() isn’t
obvious from the call site.
Fair enough, but then collapse it into one helper if FD is a concern.
My question was about stylistic/taste preferences.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help