Re: [PATCH bpf-next v6 1/5] net: Add connect_socket() helper
| Newsgroups | org.kernel.vger.bpf,org.kernel.vger.netdev |
|---|---|
| Message-ID | <4a025fcdd177da13b51aa8042d59fa5d8e3a7c022bde50d5cf79c92ed3ad516a@mail.kernel.org> |
> Add a helper that connects an existing socket while invoking the LSM > hook. Reuse it in __sys_connect_file() to avoid duplicating the connect > logic. Other socket operations have equivalent helpers that trigger the > appropriate LSM hooks that can be reused, this one was the only one > missing. This isn't a bug, but could the changelog note which follow-up user needs connect_socket() to be global (rather than static in net/socket.c), so the new header declaration is justified within this patch? The changelog motivates the helper only by the in-file reuse, but on its own that would not require a new global symbol: connect_socket() is declared in include/linux/socket.h while its single caller is 26 lines below it in net/socket.c. The actual consumer is the bpf_ksock_connect() kfunc added later in the series, which the message does not mention, so a reader of this patch alone cannot tell why the helper is not static. --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/31618864886