bpf: Introduce kprobe_multi session attach
Subsystems (8)
Jiri Olsa
reviewerv2 cover bpf: Introduce kprobe_multi session attach
hi,
adding support to attach kprobe program through kprobe_multi link in a session mode, which means:
- program is attached to both function entry and return
- entry program can decided if the return program gets executed
- entry program can share u64 cookie value with return program
The initial RFC for this was posted in [0] and later discussed more and which ended up with the session idea [1]
Having entry together with return probe for given function is common use case for tetragon, bpftrace and most likely for others.
At the moment if we want both entry and return probe to execute bpf program we need to create two (entry and return probe) links. The link for return probe creates extra entry probe to setup the return probe. The extra entry probe execution could be omitted if we had a way to use just single link for both entry and exit probe.
In addition the possibility to control the return program execution and sharing data within entry and return probe allows for other use cases.
v2 changes:
- renamed BPF_TRACE_KPROBE_MULTI_SESSION to BPF_TRACE_KPROBE_SESSION [Andrii]
- use arrays for results in selftest [Andrii]
- various small selftests and libbpf changes [Andrii]
- moved the verifier cookie setup earlier in check_kfunc_call [Andrii]
- added acks
Also available at:
https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
bpf/session_data
thanks,
jirka
[0] https://lore.kernel.org/bpf/[email protected]/
[1] https://lore.kernel.org/bpf/[email protected]/
---
Jiri Olsa (7):
bpf: Add support for kprobe session attach
bpf: Add support for kprobe session context
bpf: Add support for kprobe session cookie
libbpf: Add support for kprobe session attach
libbpf: Add kprobe session attach type name to attach_type_name selftests/bpf: Add kprobe session test
selftests/bpf: Add kprobe session cookie test
include/uapi/linux/bpf.h | 1 + kernel/bpf/btf.c | 3 +++ kernel/bpf/syscall.c | 7 +++++- kernel/bpf/verifier.c | 7 ++++++ kernel/trace/bpf_trace.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------ tools/include/uapi/linux/bpf.h | 1 + tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/libbpf.c | 40 +++++++++++++++++++++++++++++++-- tools/lib/bpf/libbpf.h | 4 +++- tools/testing/selftests/bpf/bpf_kfuncs.h | 3 +++ tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/testing/selftests/bpf/progs/kprobe_multi_session.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/testing/selftests/bpf/progs/kprobe_multi_session_cookie.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 365 insertions(+), 18 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session.c create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session_cookie.c
Jiri Olsa
reviewerPATCH v2 1/7 bpf: Add support for kprobe session attach
Adding support to attach bpf program for entry and return probe of the same function. This is common use case which at the moment requires to create two kprobe multi links.
Adding new BPF_TRACE_KPROBE_SESSION attach type that instructs kernel to attach single link program to both entry and exit probe.
It's possible to control execution of the bpf program on return probe simply by returning zero or non zero from the entry bpf program execution to execute or not the bpf program on return probe respectively.
--- include/uapi/linux/bpf.h | 1 + kernel/bpf/syscall.c | 7 ++++++- kernel/trace/bpf_trace.c | 28 ++++++++++++++++++++-------- tools/include/uapi/linux/bpf.h | 1 + 4 files changed, 28 insertions(+), 9 deletions(-)
include/uapi/linux/bpf.h +1 -0
@@ -1115,6 +1115,7 @@ enum bpf_attach_type {BPF_CGROUP_UNIX_GETSOCKNAME ,BPF_NETKIT_PRIMARY ,BPF_NETKIT_PEER , +BPF_TRACE_KPROBE_SESSION , __MAX_BPF_ATTACH_TYPE };
kernel/bpf/syscall.c +6 -1
@@ -4016,11 +4016,15 @@ static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog,if (prog->expected_attach_type ==BPF_TRACE_KPROBE_MULTI && attach_type !=BPF_TRACE_KPROBE_MULTI )return -EINVAL ; +if (prog->expected_attach_type ==BPF_TRACE_KPROBE_SESSION && + attach_type !=BPF_TRACE_KPROBE_SESSION ) +return -EINVAL ;if (prog->expected_attach_type ==BPF_TRACE_UPROBE_MULTI && attach_type !=BPF_TRACE_UPROBE_MULTI )return -EINVAL ;if (attach_type !=BPF_PERF_EVENT && attach_type !=BPF_TRACE_KPROBE_MULTI && + attach_type !=BPF_TRACE_KPROBE_SESSION && attach_type !=BPF_TRACE_UPROBE_MULTI )return -EINVAL ;return 0 ;
@@ -5281,7 +5285,8 @@ static int link_create(union bpf_attr *attr, bpfptr_t uattr)case BPF_PROG_TYPE_KPROBE :if (attr->link_create.attach_type ==BPF_PERF_EVENT ) ret =bpf_perf_link_attach (attr, prog); -else if (attr->link_create.attach_type ==BPF_TRACE_KPROBE_MULTI ) +else if (attr->link_create.attach_type ==BPF_TRACE_KPROBE_MULTI || + attr->link_create.attach_type ==BPF_TRACE_KPROBE_SESSION ) ret =bpf_kprobe_multi_link_attach (attr, prog);else if (attr->link_create.attach_type ==BPF_TRACE_UPROBE_MULTI ) ret =bpf_uprobe_multi_link_attach (attr, prog);
kernel/trace/bpf_trace.c +20 -8
@@ -1631,6 +1631,17 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) } } +static bool is_kprobe_multi (const struct bpf_prog *prog) +{ +return prog->expected_attach_type ==BPF_TRACE_KPROBE_MULTI || + prog->expected_attach_type ==BPF_TRACE_KPROBE_SESSION ; +} + +static inline bool is_kprobe_session (const struct bpf_prog *prog) +{ +return prog->expected_attach_type ==BPF_TRACE_KPROBE_SESSION ; +} +static const struct bpf_func_proto *kprobe_prog_func_proto (enum bpf_func_id func_id,const struct bpf_prog *prog) {
@@ -1646,13 +1657,13 @@ kprobe_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)return &bpf_override_return_proto;#endif case BPF_FUNC_get_func_ip: -if (prog->expected_attach_type ==BPF_TRACE_KPROBE_MULTI ) +if (is_kprobe_multi (prog))return &bpf_get_func_ip_proto_kprobe_multi;if (prog->expected_attach_type ==BPF_TRACE_UPROBE_MULTI )return &bpf_get_func_ip_proto_uprobe_multi;return &bpf_get_func_ip_proto_kprobe;case BPF_FUNC_get_attach_cookie: -if (prog->expected_attach_type ==BPF_TRACE_KPROBE_MULTI ) +if (is_kprobe_multi (prog))return &bpf_get_attach_cookie_proto_kmulti;if (prog->expected_attach_type ==BPF_TRACE_UPROBE_MULTI )return &bpf_get_attach_cookie_proto_umulti;
@@ -2834,10 +2845,11 @@ kprobe_multi_link_handler(struct fprobe *fp, unsigned long fentry_ip, void *data) {struct bpf_kprobe_multi_link *link; +int err; link = container_of(fp, struct bpf_kprobe_multi_link, fp); -kprobe_multi_link_prog_run (link,get_entry_ip (fentry_ip), regs); -return 0 ; + err =kprobe_multi_link_prog_run (link,get_entry_ip (fentry_ip), regs); +return is_kprobe_session (link->link.prog) ? err :0 ; } static void
@@ -2981,7 +2993,7 @@ int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prif (sizeof (u64) !=sizeof (void *))return -EOPNOTSUPP ; -if (prog->expected_attach_type !=BPF_TRACE_KPROBE_MULTI ) +if (!is_kprobe_multi (prog))return -EINVAL ; flags = attr->link_create.kprobe_multi.flags;
@@ -3062,10 +3074,10 @@ int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prif (err) goto error; -if (flags &BPF_F_KPROBE_MULTI_RETURN ) - link->fp.exit_handler = kprobe_multi_link_exit_handler; -else +if (!(flags &BPF_F_KPROBE_MULTI_RETURN )) link->fp.entry_handler = kprobe_multi_link_handler; +if ((flags &BPF_F_KPROBE_MULTI_RETURN ) ||is_kprobe_session (prog)) + link->fp.exit_handler = kprobe_multi_link_exit_handler; link->addrs = addrs; link->cookies = cookies;
tools/include/uapi/linux/bpf.h +1 -0
@@ -1115,6 +1115,7 @@ enum bpf_attach_type {BPF_CGROUP_UNIX_GETSOCKNAME ,BPF_NETKIT_PRIMARY ,BPF_NETKIT_PEER , +BPF_TRACE_KPROBE_SESSION , __MAX_BPF_ATTACH_TYPE };
Signature · 1 line
2.44.0
Jiri Olsa
reviewerPATCH v2 2/7 bpf: Add support for kprobe session context
In reply to Jiri OlsaAdding struct bpf_session_run_ctx object to hold session related data, which is atm is_return bool and data pointer coming in following changes.
Placing bpf_session_run_ctx layer in between bpf_run_ctx and bpf_kprobe_multi_run_ctx so the session data can be retrieved regardless of if it's kprobe_multi or uprobe_multi link, which support is coming in future. This way both kprobe_multi and uprobe_multi can use same kfuncs to access the session data.
Adding bpf_session_is_return kfunc that returns true if the bpf program is executed from the exit probe of the kprobe multi link attached in wrapper mode. It returns false otherwise.
Adding new kprobe hook for kprobe program type.
--- kernel/bpf/btf.c | 3 ++ kernel/trace/bpf_trace.c | 67 +++++++++++++++++++++++++++++++++++----- 2 files changed, 63 insertions(+), 7 deletions(-)
kernel/bpf/btf.c +3 -0
@@ -218,6 +218,7 @@ enum btf_kfunc_hook {BTF_KFUNC_HOOK_SOCKET_FILTER ,BTF_KFUNC_HOOK_LWT ,BTF_KFUNC_HOOK_NETFILTER , +BTF_KFUNC_HOOK_KPROBE , BTF_KFUNC_HOOK_MAX, };
@@ -8157,6 +8158,8 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type)return BTF_KFUNC_HOOK_LWT ;case BPF_PROG_TYPE_NETFILTER :return BTF_KFUNC_HOOK_NETFILTER ; +case BPF_PROG_TYPE_KPROBE : +return BTF_KFUNC_HOOK_KPROBE ;default :return BTF_KFUNC_HOOK_MAX ; }
kernel/trace/bpf_trace.c +60 -7
119 lines not on this page · raw message
Signature · 1 line
2.44.0
Jiri Olsa
reviewerPATCH v2 3/7 bpf: Add support for kprobe session cookie
In reply to Jiri OlsaAdding support for cookie within the session of kprobe multi entry and return program.
The session cookie is u64 value and can be retrieved be new kfunc bpf_session_cookie, which returns pointer to the cookie value. The bpf program can use the pointer to store (on entry) and load (on return) the value.
The cookie value is implemented via fprobe feature that allows to share values between entry and return ftrace fprobe callbacks.
--- kernel/bpf/verifier.c | 7 +++++++ kernel/trace/bpf_trace.c | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-)
kernel/bpf/verifier.c +7 -0
@@ -11063,6 +11063,7 @@ enum special_kfunc_type { KF_bpf_preempt_disable, KF_bpf_preempt_enable, KF_bpf_iter_css_task_new, + KF_bpf_session_cookie, };BTF_SET_START (special_kfunc_set)
@@ -11123,6 +11124,7 @@ BTF_ID(func, bpf_iter_css_task_new)#else BTF_ID_UNUSED #endif +BTF_ID(func, bpf_session_cookie) static bool is_kfunc_ret_null(struct bpf_kfunc_call_arg_meta *meta) {
@@ -12294,6 +12296,11 @@ static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, } } +if (meta.func_id == special_kfunc_list[KF_bpf_session_cookie]) { + meta.r0_size =sizeof (u64); + meta.r0_rdonly = false; + } +if (is_bpf_wq_set_callback_impl_kfunc (meta.func_id)) { err =push_callback_call (env, insn, insn_idx, meta.subprogno, set_timer_callback_state);
kernel/trace/bpf_trace.c +16 -3
@@ -2599,6 +2599,7 @@ fs_initcall(bpf_event_init);struct bpf_session_run_ctx {struct bpf_run_ctx run_ctx;bool is_return; +void *data; };#ifdef CONFIG_FPROBE
@@ -2819,11 +2820,12 @@ static u64 bpf_kprobe_multi_entry_ip(struct bpf_run_ctx *ctx)static int kprobe_multi_link_prog_run (struct bpf_kprobe_multi_link *link,unsigned long entry_ip,struct pt_regs *regs, -bool is_return) +bool is_return,void *data) {struct bpf_kprobe_multi_run_ctx run_ctx = { .session_ctx = { .is_return = is_return, + .data = data, }, .link = link, .entry_ip = entry_ip,
@@ -2859,7 +2861,7 @@ kprobe_multi_link_handler(struct fprobe *fp, unsigned long fentry_ip,int err; link = container_of(fp, struct bpf_kprobe_multi_link, fp); - err =kprobe_multi_link_prog_run (link,get_entry_ip (fentry_ip), regs, false); + err =kprobe_multi_link_prog_run (link,get_entry_ip (fentry_ip), regs, false, data);return is_kprobe_session (link->link.prog) ? err :0 ; }
@@ -2871,7 +2873,7 @@ kprobe_multi_link_exit_handler(struct fprobe *fp, unsigned long fentry_ip,struct bpf_kprobe_multi_link *link; link = container_of(fp, struct bpf_kprobe_multi_link, fp); -kprobe_multi_link_prog_run (link,get_entry_ip (fentry_ip), regs, true); +kprobe_multi_link_prog_run (link,get_entry_ip (fentry_ip), regs, true, data); }static int symbols_cmp_r (const void *a,const void *b,const void *priv)
@@ -3089,6 +3091,8 @@ int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr link->fp.entry_handler = kprobe_multi_link_handler;if ((flags &BPF_F_KPROBE_MULTI_RETURN ) ||is_kprobe_session (prog)) link->fp.exit_handler = kprobe_multi_link_exit_handler; +if (is_kprobe_session (prog)) + link->fp.entry_data_size =sizeof (u64); link->addrs = addrs; link->cookies = cookies;
@@ -3526,10 +3530,19 @@ __bpf_kfunc bool bpf_session_is_return(void)return session_ctx->is_return; } +__bpf_kfunc __u64 *bpf_session_cookie(void) +{ +struct bpf_session_run_ctx *session_ctx; + + session_ctx = container_of(current->bpf_ctx, struct bpf_session_run_ctx, run_ctx); +return session_ctx->data; +} +__bpf_kfunc_end_defs (); BTF_KFUNCS_START(kprobe_multi_kfunc_set_ids) BTF_ID_FLAGS(func, bpf_session_is_return) +BTF_ID_FLAGS(func, bpf_session_cookie) BTF_KFUNCS_END(kprobe_multi_kfunc_set_ids) static int bpf_kprobe_multi_filter(const struct bpf_prog *prog, u32 kfunc_id)
Signature · 1 line
2.44.0
Jiri Olsa
reviewerPATCH v2 4/7 libbpf: Add support for kprobe session attach
In reply to Jiri OlsaAdding support to attach program in kprobe session mode with bpf_program__attach_kprobe_multi_opts function.
Adding session bool to bpf_kprobe_multi_opts struct that allows to load and attach the bpf program via kprobe session. the attachment to create kprobe multi session.
Also adding new program loader section that allows:
SEC("kprobe.session/bpf_fentry_test*")
and loads/attaches kprobe program as kprobe session.
--- tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/libbpf.c | 39 +++++++++++++++++++++++++++++++++++++-- tools/lib/bpf/libbpf.h | 4 +++- 3 files changed, 41 insertions(+), 3 deletions(-)
tools/lib/bpf/bpf.c +1 -0
@@ -766,6 +766,7 @@ int bpf_link_create(int prog_fd, int target_fd,return libbpf_err (-EINVAL );break ;case BPF_TRACE_KPROBE_MULTI : +case BPF_TRACE_KPROBE_SESSION : attr.link_create.kprobe_multi.flags =OPTS_GET (opts, kprobe_multi.flags,0 ); attr.link_create.kprobe_multi.cnt =OPTS_GET (opts, kprobe_multi.cnt,0 ); attr.link_create.kprobe_multi.syms =ptr_to_u64 (OPTS_GET (opts, kprobe_multi.syms,0 ));
tools/lib/bpf/libbpf.c +37 -2
@@ -9273,6 +9273,7 @@ static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_linstatic int attach_raw_tp (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_trace (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_kprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link); +static int attach_kprobe_session (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_uprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_lsm (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_iter (const struct bpf_program *prog,long cookie,struct bpf_link **link);
@@ -9289,6 +9290,7 @@ static const struct bpf_sec_def section_defs[] = {SEC_DEF ("uretprobe.s+" ,KPROBE ,0 ,SEC_SLEEPABLE , attach_uprobe),SEC_DEF ("kprobe.multi+" ,KPROBE ,BPF_TRACE_KPROBE_MULTI ,SEC_NONE , attach_kprobe_multi),SEC_DEF ("kretprobe.multi+" ,KPROBE ,BPF_TRACE_KPROBE_MULTI ,SEC_NONE , attach_kprobe_multi), +SEC_DEF ("kprobe.session+" ,KPROBE ,BPF_TRACE_KPROBE_SESSION ,SEC_NONE , attach_kprobe_session),SEC_DEF ("uprobe.multi+" ,KPROBE ,BPF_TRACE_UPROBE_MULTI ,SEC_NONE , attach_uprobe_multi),SEC_DEF ("uretprobe.multi+" ,KPROBE ,BPF_TRACE_UPROBE_MULTI ,SEC_NONE , attach_uprobe_multi), SEC_DEF("uprobe.multi.s+", KPROBE, BPF_TRACE_UPROBE_MULTI, SEC_SLEEPABLE, attach_uprobe_multi),
@@ -11381,13 +11383,14 @@ bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog,struct kprobe_multi_resolve res = { .pattern = pattern, }; +enum bpf_attach_type attach_type;struct bpf_link *link =NULL ;char errmsg[STRERR_BUFSIZE ];const unsigned long *addrs;int err, link_fd, prog_fd; +bool retprobe, session;const __u64 *cookies;const char **syms; -bool retprobe;size_t cnt;if (!OPTS_VALID (opts, bpf_kprobe_multi_opts))
@@ -11426,6 +11429,12 @@ bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, } retprobe =OPTS_GET (opts, retprobe, false); + session =OPTS_GET (opts, session, false); + +if (retprobe && session) +return libbpf_err_ptr (-EINVAL ); + + attach_type = session ?BPF_TRACE_KPROBE_SESSION :BPF_TRACE_KPROBE_MULTI ; lopts.kprobe_multi.syms = syms; lopts.kprobe_multi.addrs = addrs;
@@ -11440,7 +11449,7 @@ bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, } link->detach = &bpf_link__detach_fd; - link_fd =bpf_link_create (prog_fd,0 ,BPF_TRACE_KPROBE_MULTI , &lopts); + link_fd =bpf_link_create (prog_fd,0 , attach_type, &lopts);if (link_fd <0 ) { err = -errno; pr_warn("prog '%s': failed to attach: %s\n",
@@ -11546,6 +11555,32 @@ static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, strureturn libbpf_get_error (*link); } +static int attach_kprobe_session (const struct bpf_program *prog,long cookie, +struct bpf_link **link) +{ + LIBBPF_OPTS(bpf_kprobe_multi_opts, opts, .session = true); +const char *spec; +char *pattern; +int n; + + *link =NULL ; + +/* no auto-attach for SEC("kprobe.session") */ +if (strcmp (prog->sec_name,"kprobe.session" ) ==0 ) +return 0 ; + + spec = prog->sec_name +sizeof ("kprobe.session/" ) -1 ; + n =sscanf (spec,"%m[a-zA-Z0-9_.*?]" , &pattern); +if (n <1 ) { +pr_warn ("kprobe session pattern is invalid: %s\n" , pattern); +return -EINVAL ; + } + + *link =bpf_program__attach_kprobe_multi_opts (prog, pattern, &opts); +free (pattern); +return *link ?0 : -errno; +} +static int attach_uprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link) {char *probe_type =NULL , *binary_path =NULL , *func_name =NULL ;
tools/lib/bpf/libbpf.h +3 -1
@@ -539,10 +539,12 @@ struct bpf_kprobe_multi_opts {size_t cnt;/* create return kprobes */ bool retprobe; +/* create session kprobes */ +bool session; size_t :0; }; -#define bpf_kprobe_multi_opts__last_field retprobe +#define bpf_kprobe_multi_opts__last_field session LIBBPF_API struct bpf_link * bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog,
Signature · 1 line
2.44.0
Re: [PATCHv2 bpf-next 4/7] libbpf: Add support for kprobe session attach
Quoted 103 lines · Jiri Olsa
Adding support to attach program in kprobe session mode with
bpf_program__attach_kprobe_multi_optsfunction.Adding session bool to
bpf_kprobe_multi_optsstruct that allows to load and attach the bpf program via kprobe session. the attachment to create kprobe multi session.Also adding new program loader section that allows:
SEC("kprobe.session/bpf_fentry_test*")and loads/attaches kprobe program as kprobe session.
Acked-by Andrii Nakryiko <[email protected]>Signed-off-by Jiri Olsa <[email protected]>--- tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/libbpf.c | 39 +++++++++++++++++++++++++++++++++++++-- tools/lib/bpf/libbpf.h | 4 +++- 3 files changed, 41 insertions(+), 3 deletions(-)tools/lib/bpf/bpf.c +1
-0@@ -766,6 +766,7 @@ int bpf_link_create(int prog_fd, int target_fd,return libbpf_err (-EINVAL );break ;case BPF_TRACE_KPROBE_MULTI : +case BPF_TRACE_KPROBE_SESSION : attr.link_create.kprobe_multi.flags =OPTS_GET (opts, kprobe_multi.flags,0 ); attr.link_create.kprobe_multi.cnt =OPTS_GET (opts, kprobe_multi.cnt,0 ); attr.link_create.kprobe_multi.syms =ptr_to_u64 (OPTS_GET (opts, kprobe_multi.syms,0 ));tools/lib/bpf/libbpf.c +19
-2@@ -9273,6 +9273,7 @@ static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_linstatic int attach_raw_tp (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_trace (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_kprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link); +static int attach_kprobe_session (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_uprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_lsm (const struct bpf_program *prog,long cookie,struct bpf_link **link);static int attach_iter (const struct bpf_program *prog,long cookie,struct bpf_link **link);@@ -9289,6 +9290,7 @@ static const struct bpf_sec_def section_defs[] = {SEC_DEF ("uretprobe.s+" ,KPROBE ,0 ,SEC_SLEEPABLE , attach_uprobe),SEC_DEF ("kprobe.multi+" ,KPROBE ,BPF_TRACE_KPROBE_MULTI ,SEC_NONE , attach_kprobe_multi),SEC_DEF ("kretprobe.multi+" ,KPROBE ,BPF_TRACE_KPROBE_MULTI ,SEC_NONE , attach_kprobe_multi), +SEC_DEF ("kprobe.session+" ,KPROBE ,BPF_TRACE_KPROBE_SESSION ,SEC_NONE , attach_kprobe_session),SEC_DEF ("uprobe.multi+" ,KPROBE ,BPF_TRACE_UPROBE_MULTI ,SEC_NONE , attach_uprobe_multi),SEC_DEF ("uretprobe.multi+" ,KPROBE ,BPF_TRACE_UPROBE_MULTI ,SEC_NONE , attach_uprobe_multi), SEC_DEF("uprobe.multi.s+", KPROBE, BPF_TRACE_UPROBE_MULTI, SEC_SLEEPABLE, attach_uprobe_multi),@@ -11381,13 +11383,14 @@ bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog,struct kprobe_multi_resolve res = { .pattern = pattern, }; +enum bpf_attach_type attach_type;struct bpf_link *link =NULL ;char errmsg[STRERR_BUFSIZE ];const unsigned long *addrs;int err, link_fd, prog_fd; +bool retprobe, session;const __u64 *cookies;const char **syms; -bool retprobe;size_t cnt;if (!OPTS_VALID (opts, bpf_kprobe_multi_opts))@@ -11426,6 +11429,12 @@ bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, } retprobe =OPTS_GET (opts, retprobe, false); + session =OPTS_GET (opts, session, false); + +if (retprobe && session) +return libbpf_err_ptr (-EINVAL ); + + attach_type = session ?BPF_TRACE_KPROBE_SESSION :BPF_TRACE_KPROBE_MULTI ; lopts.kprobe_multi.syms = syms; lopts.kprobe_multi.addrs = addrs;@@ -11440,7 +11449,7 @@ bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, } link->detach = &bpf_link__detach_fd; - link_fd =bpf_link_create (prog_fd,0 ,BPF_TRACE_KPROBE_MULTI , &lopts); + link_fd =bpf_link_create (prog_fd,0 , attach_type, &lopts);if (link_fd <0 ) { err = -errno; pr_warn("prog '%s': failed to attach: %s\n",@@ -11546,6 +11555,32 @@ static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, strureturn libbpf_get_error (*link); } +static int attach_kprobe_session (const struct bpf_program *prog,long cookie, +struct bpf_link **link) +{ + LIBBPF_OPTS(bpf_kprobe_multi_opts, opts, .session = true); +const char *spec; +char *pattern; +int n; +
tools/lib/bpf/libbpf.c static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, stru · line 11575
Quoted 10 lines
tools/lib/bpf/libbpf.c +10
-0+ *link =NULL ; + +/* no auto-attach for SEC("kprobe.session") */ +if (strcmp (prog->sec_name,"kprobe.session" ) ==0 ) +return 0 ; + + spec = prog->sec_name +sizeof ("kprobe.session/" ) -1 ; + n =sscanf (spec,"%m[a-zA-Z0-9_.*?]" , &pattern); +if (n <1 ) { +pr_warn ("kprobe session pattern is invalid: %s\n" , pattern);
this should be printing spec, not pattern, please send a follow up fix, thanks
Quoted 32 lines
tools/lib/bpf/libbpf.c +8
-0+return -EINVAL ; + } + + *link =bpf_program__attach_kprobe_multi_opts (prog, pattern, &opts); +free (pattern); +return *link ?0 : -errno; +} +static int attach_uprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link) {char *probe_type =NULL , *binary_path =NULL , *func_name =NULL ;tools/lib/bpf/libbpf.h +3
-2@@ -539,10 +539,12 @@ struct bpf_kprobe_multi_opts {size_t cnt;/* create return kprobes */ bool retprobe; +/* create session kprobes */ +bool session; size_t :0; }; -#define bpf_kprobe_multi_opts__last_field retprobe +#define bpf_kprobe_multi_opts__last_field session LIBBPF_API struct bpf_link * bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, --2.44.0
Re: [PATCHv2 bpf-next 4/7] libbpf: Add support for kprobe session attach
On Wed, May 01, 2024 at 11:30:55AM -0700, Andrii Nakryiko wrote:
SNIP
Quoted 13 lines
Quoted 13 lines
tools/lib/bpf/libbpf.c +12
-0+static int attach_kprobe_session (const struct bpf_program *prog,long cookie, +struct bpf_link **link) +{ + LIBBPF_OPTS(bpf_kprobe_multi_opts, opts, .session = true); +const char *spec; +char *pattern; +int n; + + *link =NULL ; + +/* no auto-attach for SEC("kprobe.session") */ +if (strcmp (prog->sec_name,"kprobe.session" ) ==0 )
Quoted 8 lines
tools/lib/bpf/libbpf.c static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, stru · line 11575
Quoted 6 lines
tools/lib/bpf/libbpf.c +6
-0+return 0 ; + + spec = prog->sec_name +sizeof ("kprobe.session/" ) -1 ; + n =sscanf (spec,"%m[a-zA-Z0-9_.*?]" , &pattern); +if (n <1 ) { +pr_warn ("kprobe session pattern is invalid: %s\n" , pattern);this should be printing spec, not pattern, please send a follow up fix, thanks
ugh yes, also attach_kprobe_multi is broken same way, will send the fix tomorrow
thanks,
jirka
Quoted 33 lines
Quoted 33 lines
tools/lib/bpf/libbpf.c +8
-0+return -EINVAL ; + } + + *link =bpf_program__attach_kprobe_multi_opts (prog, pattern, &opts); +free (pattern); +return *link ?0 : -errno; +} +static int attach_uprobe_multi (const struct bpf_program *prog,long cookie,struct bpf_link **link) {char *probe_type =NULL , *binary_path =NULL , *func_name =NULL ;tools/lib/bpf/libbpf.h +3
-2@@ -539,10 +539,12 @@ struct bpf_kprobe_multi_opts {size_t cnt;/* create return kprobes */ bool retprobe; +/* create session kprobes */ +bool session; size_t :0; }; -#define bpf_kprobe_multi_opts__last_field retprobe +#define bpf_kprobe_multi_opts__last_field session LIBBPF_API struct bpf_link * bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, --2.44.0
Jiri Olsa
reviewerPATCH v2 5/7 libbpf: Add kprobe session attach type name to attach_type_name
In reply to Jiri OlsaAdding kprobe session attach type name to attach_type_name, so libbpf_bpf_attach_type_str returns proper string name for BPF_TRACE_KPROBE_SESSION attach type.
--- tools/lib/bpf/libbpf.c | 1 + 1 file changed, 1 insertion(+)
tools/lib/bpf/libbpf.c +1 -0
@@ -132,6 +132,7 @@ static const char * const attach_type_name[] = { [BPF_TRACE_UPROBE_MULTI] = "trace_uprobe_multi", [BPF_NETKIT_PRIMARY] = "netkit_primary", [BPF_NETKIT_PEER] = "netkit_peer", + [BPF_TRACE_KPROBE_SESSION] = "trace_kprobe_session", };static const char *const link_type_name[] = {
Signature · 1 line
2.44.0
Jiri Olsa
reviewerPATCH v2 6/7 selftests/bpf: Add kprobe session test
In reply to Jiri OlsaAdding kprobe session test and testing that the entry program return value controls execution of the return probe program.
--- tools/testing/selftests/bpf/bpf_kfuncs.h | 2 + .../bpf/prog_tests/kprobe_multi_test.c | 39 ++++++++++ .../bpf/progs/kprobe_multi_session.c | 78 +++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session.c
tools/testing/selftests/bpf/bpf_kfuncs.h +2 -0
@@ -75,4 +75,6 @@ extern void bpf_key_put(struct bpf_key *key) __ksym; extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr, struct bpf_dynptr *sig_ptr, struct bpf_key *trusted_keyring) __ksym; + +extern bool bpf_session_is_return(void) __ksym;#endif
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c +39 -0
@@ -4,6 +4,7 @@#include "trace_helpers.h" #include "kprobe_multi_empty.skel.h" #include "kprobe_multi_override.skel.h" +#include "kprobe_multi_session.skel.h" #include "bpf/libbpf_internal.h" #include "bpf/hashmap.h"
@@ -326,6 +327,42 @@ static void test_attach_api_fails(void)kprobe_multi__destroy (skel); } +static void test_session_skel_api (void ) +{ +struct kprobe_multi_session *skel =NULL ; +LIBBPF_OPTS (bpf_kprobe_multi_opts, opts); +LIBBPF_OPTS (bpf_test_run_opts, topts); +struct bpf_link *link =NULL ; +int i, err, prog_fd; + + skel =kprobe_multi_session__open_and_load (); +if (!ASSERT_OK_PTR (skel,"kprobe_multi_session__open_and_load" )) +return ; + + skel->bss->pid =getpid (); + + err =kprobe_multi_session__attach (skel); +if (!ASSERT_OK (err," kprobe_multi_session__attach" )) + goto cleanup; + + prog_fd =bpf_program__fd (skel->progs.trigger); + err =bpf_prog_test_run_opts (prog_fd, &topts); +ASSERT_OK (err,"test_run" ); +ASSERT_EQ (topts.retval,0 ,"test_run" ); + +/* bpf_fentry_test1-4 trigger return probe, result is 2 */ +for (i =0 ; i <4 ; i++) +ASSERT_EQ (skel->bss->kprobe_session_result[i],2 ,"kprobe_session_result" ); + +/* bpf_fentry_test5-8 trigger only entry probe, result is 1 */ +for (i =4 ; i <8 ; i++) +ASSERT_EQ (skel->bss->kprobe_session_result[i],1 ,"kprobe_session_result" ); + +cleanup: +bpf_link__destroy (link); +kprobe_multi_session__destroy (skel); +} +static size_t symbol_hash (long key,void *ctx__maybe_unused ) {return str_hash ((const char *) key);
@@ -690,4 +727,6 @@ void test_kprobe_multi_test(void)test_attach_api_fails ();if (test__start_subtest ("attach_override" ))test_attach_override (); +if (test__start_subtest ("session" )) +test_session_skel_api (); }
tools/testing/selftests/bpf/progs/kprobe_multi_session.c new file +78 -0
78 lines not on this page · raw message
Signature · 1 line
2.44.0
Re: [PATCHv2 bpf-next 6/7] selftests/bpf: Add kprobe session test
Quoted 4 lines · Jiri Olsa
Adding kprobe session test and testing that the entry program return value controls execution of the return probe program.
Quoted 8 lines
Signed-off-by Jiri Olsa <[email protected]>--- tools/testing/selftests/bpf/bpf_kfuncs.h | 2 + .../bpf/prog_tests/kprobe_multi_test.c | 39 ++++++++++ .../bpf/progs/kprobe_multi_session.c | 78 +++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session.c
Given the things I mentioned below were the only "problems" I found, I applied the patch and fixed those issues up while applying. Thanks a lot for working on this! Excited about this feature, it's been asked by our internal customers for a while as well. Looking forward to uprobe session program type!
tools/testing/selftests/bpf/bpf_kfuncs.h extern void bpf_key_put(struct bpf_key *key) __ksym; · line 79
Quoted 10 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +2
-0@@ -75,4 +75,6 @@ extern void bpf_key_put(struct bpf_key *key) __ksym; extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr, struct bpf_dynptr *sig_ptr, struct bpf_key *trusted_keyring) __ksym; + +extern bool bpf_session_is_return(void) __ksym;
should be __weak, always make it __weak. vmlinux.h with kfuncs is coming
same for another kfunc in next patch
Quoted 1 line
tools/testing/selftests/bpf/bpf_kfuncs.h +0
-0#endif
[...]
tools/testing/selftests/bpf/bpf_kfuncs.h
Quoted 11 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +11
-0+static const void *kfuncs[8 ] = { + &bpf_fentry_test1, + &bpf_fentry_test2, + &bpf_fentry_test3, + &bpf_fentry_test4, + &bpf_fentry_test5, + &bpf_fentry_test6, + &bpf_fentry_test7, + &bpf_fentry_test8, +}; +
this is not supposed to work :) I don't think libbpf support this kind of relocations in data section.
The only reason it works in practice is because compiler completely inlines access to this array and so code just has unrolled loop (thanks to "static const" and -O2).
This is a bit fragile, though. It might keep working, of course (though I'm not sure if -O1 would still work), but I'd feel a bit more comfortable if you define and initialize this array inside the function (then it will be guaranteed to work with libbpf logic)
[...]
Re: [PATCHv2 bpf-next 6/7] selftests/bpf: Add kprobe session test
Quoted 14 lines · Andrii Nakryiko
Quoted 4 lines · Jiri Olsa
Adding kprobe session test and testing that the entry program return value controls execution of the return probe program.
Quoted 8 lines
Signed-off-by Jiri Olsa <[email protected]>--- tools/testing/selftests/bpf/bpf_kfuncs.h | 2 + .../bpf/prog_tests/kprobe_multi_test.c | 39 ++++++++++ .../bpf/progs/kprobe_multi_session.c | 78 +++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session.c
Quoted 5 lines
Given the things I mentioned below were the only "problems" I found, I applied the patch and fixed those issues up while applying. Thanks a lot for working on this! Excited about this feature, it's been asked by our internal customers for a while as well. Looking forward to uprobe session program type!
great, I'll send it soon
Quoted 14 lines
tools/testing/selftests/bpf/bpf_kfuncs.h extern void bpf_key_put(struct bpf_key *key) __ksym; · line 79
Quoted 11 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +2
-0@@ -75,4 +75,6 @@ extern void bpf_key_put(struct bpf_key *key) __ksym; extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr, struct bpf_dynptr *sig_ptr, struct bpf_key *trusted_keyring) __ksym; + +extern bool bpf_session_is_return(void) __ksym;should be
__weak, always make it__weak.vmlinux.hwith kfuncs is coming
Quoted 1 line
same for another kfunc in next patch
ok
Quoted 5 lines
Quoted 2 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +0
-0#endif [...]
Quoted 14 lines
tools/testing/selftests/bpf/bpf_kfuncs.h
Quoted 11 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +11
-0+static const void *kfuncs[8 ] = { + &bpf_fentry_test1, + &bpf_fentry_test2, + &bpf_fentry_test3, + &bpf_fentry_test4, + &bpf_fentry_test5, + &bpf_fentry_test6, + &bpf_fentry_test7, + &bpf_fentry_test8, +}; +this is not supposed to work :) I don't think libbpf support this kind of relocations in data section.
aah, nice ;-) should we make it work (or make sure it works) ? seems useful
Quoted 9 lines
The only reason it works in practice is because compiler completely inlines access to this array and so code just has unrolled loop (thanks to "static const" and -O2).
This is a bit fragile, though. It might keep working, of course (though I'm not sure if -O1 would still work), but I'd feel a bit more comfortable if you define and initialize this array inside the function (then it will be guaranteed to work with libbpf logic)
thanks,
jirka
Re: [PATCHv2 bpf-next 6/7] selftests/bpf: Add kprobe session test
Quoted 62 lines · Jiri Olsa
Quoted 14 lines · Andrii Nakryiko
Quoted 4 lines · Jiri Olsa
Adding kprobe session test and testing that the entry program return value controls execution of the return probe program.
Quoted 8 lines
Signed-off-by Jiri Olsa <[email protected]>--- tools/testing/selftests/bpf/bpf_kfuncs.h | 2 + .../bpf/prog_tests/kprobe_multi_test.c | 39 ++++++++++ .../bpf/progs/kprobe_multi_session.c | 78 +++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session.cQuoted 5 lines
Given the things I mentioned below were the only "problems" I found, I applied the patch and fixed those issues up while applying. Thanks a lot for working on this! Excited about this feature, it's been asked by our internal customers for a while as well. Looking forward to uprobe session program type!
great, I'll send it soon
Quoted 14 lines
tools/testing/selftests/bpf/bpf_kfuncs.h extern void bpf_key_put(struct bpf_key *key) __ksym; · line 79
Quoted 11 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +2
-0@@ -75,4 +75,6 @@ extern void bpf_key_put(struct bpf_key *key) __ksym; extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr, struct bpf_dynptr *sig_ptr, struct bpf_key *trusted_keyring) __ksym; + +extern bool bpf_session_is_return(void) __ksym;should be
__weak, always make it__weak.vmlinux.hwith kfuncs is comingQuoted 1 line
same for another kfunc in next patch
ok
Quoted 5 lines
Quoted 2 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +0
-0#endif [...]
Quoted 14 lines
tools/testing/selftests/bpf/bpf_kfuncs.h
Quoted 11 lines
tools/testing/selftests/bpf/bpf_kfuncs.h +11
-0+static const void *kfuncs[8 ] = { + &bpf_fentry_test1, + &bpf_fentry_test2, + &bpf_fentry_test3, + &bpf_fentry_test4, + &bpf_fentry_test5, + &bpf_fentry_test6, + &bpf_fentry_test7, + &bpf_fentry_test8, +}; +this is not supposed to work :) I don't think libbpf support this kind of relocations in data section.
Quoted 2 lines
aah, nice ;-) should we make it work (or make sure it works) ? seems useful
let's see if there are any real use cases beyond selftests, first
Quoted 12 lines
Quoted 9 lines
The only reason it works in practice is because compiler completely inlines access to this array and so code just has unrolled loop (thanks to "static const" and -O2).
This is a bit fragile, though. It might keep working, of course (though I'm not sure if -O1 would still work), but I'd feel a bit more comfortable if you define and initialize this array inside the function (then it will be guaranteed to work with libbpf logic)
thanks,
jirka
Jiri Olsa
reviewerPATCH v2 7/7 selftests/bpf: Add kprobe session cookie test
In reply to Jiri OlsaAdding kprobe session test that verifies the cookie value get properly propagated from entry to return program.
--- tools/testing/selftests/bpf/bpf_kfuncs.h | 1 + .../bpf/prog_tests/kprobe_multi_test.c | 35 +++++++++++ .../bpf/progs/kprobe_multi_session_cookie.c | 58 +++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_session_cookie.c
tools/testing/selftests/bpf/bpf_kfuncs.h +1 -0
@@ -77,4 +77,5 @@ extern int bpf_verify_pkcs7_signature(struct bpf_dynptr *data_ptr, struct bpf_key *trusted_keyring) __ksym; extern bool bpf_session_is_return(void) __ksym; +extern long *bpf_session_cookie (void ) __ksym;#endif
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c +35 -0
@@ -5,6 +5,7 @@#include "kprobe_multi_empty.skel.h" #include "kprobe_multi_override.skel.h" #include "kprobe_multi_session.skel.h" +#include "kprobe_multi_session_cookie.skel.h" #include "bpf/libbpf_internal.h" #include "bpf/hashmap.h"
@@ -363,6 +364,38 @@ static void test_session_skel_api(void)kprobe_multi_session__destroy (skel); } +static void test_session_cookie_skel_api (void ) +{ +struct kprobe_multi_session_cookie *skel =NULL ; +LIBBPF_OPTS (bpf_kprobe_multi_opts, opts); +LIBBPF_OPTS (bpf_test_run_opts, topts); +struct bpf_link *link =NULL ; +int err, prog_fd; + + skel =kprobe_multi_session_cookie__open_and_load (); +if (!ASSERT_OK_PTR (skel,"fentry_raw_skel_load" )) +return ; + + skel->bss->pid =getpid (); + + err =kprobe_multi_session_cookie__attach (skel); +if (!ASSERT_OK (err," kprobe_multi_wrapper__attach" )) + goto cleanup; + + prog_fd =bpf_program__fd (skel->progs.trigger); + err =bpf_prog_test_run_opts (prog_fd, &topts); +ASSERT_OK (err,"test_run" ); +ASSERT_EQ (topts.retval,0 ,"test_run" ); + +ASSERT_EQ (skel->bss->test_kprobe_1_result,1 ,"test_kprobe_1_result" ); +ASSERT_EQ (skel->bss->test_kprobe_2_result,2 ,"test_kprobe_2_result" ); +ASSERT_EQ (skel->bss->test_kprobe_3_result,3 ,"test_kprobe_3_result" ); + +cleanup: +bpf_link__destroy (link); +kprobe_multi_session_cookie__destroy (skel); +} +static size_t symbol_hash (long key,void *ctx__maybe_unused ) {return str_hash ((const char *) key);
@@ -729,4 +762,6 @@ void test_kprobe_multi_test(void)test_attach_override ();if (test__start_subtest ("session" ))test_session_skel_api (); +if (test__start_subtest ("session_cookie" )) +test_session_cookie_skel_api (); }
tools/testing/selftests/bpf/progs/kprobe_multi_session_cookie.c new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.44.0
This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Tue, 30 Apr 2024 13:28:23 +0200 you wrote:
hi,
adding support to attach kprobe program throughkprobe_multilink in a session mode, which means:
- program is attached to both function entry and return
- entry program can decided if the return program gets executed
- entry program can share u64 cookie value with return program[...]
Here is the summary with links:
- [PATCHv2,bpf-next,1/7] bpf: Add support for kprobe session attach
https://git.kernel.org/bpf/bpf-next/c/535a3692ba72 - [PATCHv2,bpf-next,2/7] bpf: Add support for kprobe session context https://git.kernel.org/bpf/bpf-next/c/adf46d88ae4b - [PATCHv2,bpf-next,3/7] bpf: Add support for kprobe session cookie https://git.kernel.org/bpf/bpf-next/c/5c919acef851 - [PATCHv2,bpf-next,4/7] libbpf: Add support for kprobe session attach https://git.kernel.org/bpf/bpf-next/c/2ca178f02b2f - [PATCHv2,bpf-next,5/7] libbpf: Add kprobe session attach type name to attach_type_name https://git.kernel.org/bpf/bpf-next/c/7b94965429f2 - [PATCHv2,bpf-next,6/7] selftests/bpf: Add kprobe session test https://git.kernel.org/bpf/bpf-next/c/0983b1697aef - [PATCHv2,bpf-next,7/7] selftests/bpf: Add kprobe session cookie test https://git.kernel.org/bpf/bpf-next/c/a3a5113393cc
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html