Netdev List
 help / color / mirror / Atom feed
From: Mahe Tardy <mahe.tardy@gmail.com>
To: Jiayuan Chen <jiayuan.chen@linux.dev>
Cc: bpf@vger.kernel.org, andrew+netdev@lunn.ch, andrii@kernel.org,
	ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net,
	eddyz87@gmail.com, edumazet@google.com, john.fastabend@gmail.com,
	kuba@kernel.org, liamwisehart@meta.com, martin.lau@linux.dev,
	pabeni@redhat.com, song@kernel.org, netdev@vger.kernel.org,
	sdf.kernel@gmail.com, ameryhung@gmail.com, kuniyu@google.com,
	memxor@gmail.com
Subject: Re: [PATCH bpf-next v4 2/5] bpf: Add ksock kfuncs
Date: Fri, 7 Aug 2026 11:56:28 +0200	[thread overview]
Message-ID: <anWrzACWnpfAwNJo@gmail.com> (raw)
In-Reply-To: <6a86c972-99af-4e35-9392-8776d57dbc9a@linux.dev>

On Fri, Aug 07, 2026 at 11:08:43AM +0800, Jiayuan Chen wrote:
> 
> On 8/7/26 2:22 AM, Mahe Tardy wrote:
> 
> 
> [...]
> 
> > +	return ret;
> > +}
> > +
> > +__bpf_kfunc_end_defs();
> > +
> > +BTF_KFUNCS_START(ksock_init_kfunc_btf_ids)
> > +BTF_ID_FLAGS(func, bpf_ksock_create, KF_ACQUIRE | KF_RET_NULL | KF_SLEEPABLE)
> > +BTF_ID_FLAGS(func, bpf_ksock_connect, KF_SLEEPABLE)
> > +BTF_KFUNCS_END(ksock_init_kfunc_btf_ids)
> > +
> > +static const struct btf_kfunc_id_set ksock_init_kfunc_set = {
> > +	.owner = THIS_MODULE,
> > +	.set = &ksock_init_kfunc_btf_ids,
> > +};
> > +
> > +BTF_KFUNCS_START(ksock_kfunc_btf_ids)
> > +BTF_ID_FLAGS(func, bpf_ksock_release, KF_RELEASE)
> > +BTF_ID_FLAGS(func, bpf_ksock_acquire, KF_ACQUIRE | KF_RCU | KF_RET_NULL)
> > +BTF_ID_FLAGS(func, bpf_ksock_send, KF_SLEEPABLE)
> > +BTF_KFUNCS_END(ksock_kfunc_btf_ids)
> > +
> > +BTF_ID_LIST_SINGLE(bpf_lsm_socket_sendmsg_id, func, bpf_lsm_socket_sendmsg)
> > +
> 
> 
> I guess bpf_lsm_socket_sendmsg will not be compiled when CONFIG_BPF_LSM is
> disabled
> 

Yes indeed we can guard this with CONFIG_BPF_LSM as it might produce a
warning on building with CONFIG_BPF_LSM disabled. Thanks.


  reply	other threads:[~2026-08-07  9:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 18:22 [PATCH bpf-next v4 0/5] Introduce bpf_ksock Mahe Tardy
2026-08-06 18:22 ` [PATCH bpf-next v4 1/5] net: Add connect_socket() helper Mahe Tardy
2026-08-06 20:09   ` Song Liu
2026-08-07  1:53   ` Jiayuan Chen
2026-08-07  9:51     ` Mahe Tardy
2026-08-06 18:22 ` [PATCH bpf-next v4 2/5] bpf: Add ksock kfuncs Mahe Tardy
2026-08-07  3:08   ` Jiayuan Chen
2026-08-07  9:56     ` Mahe Tardy [this message]
2026-08-06 18:22 ` [PATCH bpf-next v4 3/5] selftests/bpf: Add ksock kfunc test Mahe Tardy
2026-08-07  9:12   ` Jiayuan Chen
2026-08-07 10:11     ` Mahe Tardy
2026-08-06 18:22 ` [PATCH bpf-next v4 4/5] selftests/bpf: Test forbidden bpf_ksock_send() LSM attach Mahe Tardy
2026-08-06 18:22 ` [PATCH bpf-next v4 5/5] selftests/bpf: Add ksock test for async callback guard Mahe Tardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anWrzACWnpfAwNJo@gmail.com \
    --to=mahe.tardy@gmail.com \
    --cc=ameryhung@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=jiayuan.chen@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=liamwisehart@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf.kernel@gmail.com \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox