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: Leon Hwang <hidden>
Date: 2026-01-23 04:19:30
Also in: bpf, linux-kselftest, lkml


On 23/1/26 12:12, Alexei Starovoitov wrote:
On Thu, Jan 22, 2026 at 8:07 PM Leon Hwang [off-list ref] wrote:
quoted


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.
Understood, thanks for the clarification.

I’ll rework it with the stylistic preference in mind.

Thanks,
Leon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help