From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Jiri Kosina <jikos@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>
Cc: Tero Kristo <tero.kristo@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
bpf@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: [RFC bpf-next v4 1/7] bpf/btf: also allow kfunc in tracing programs
Date: Thu, 21 Apr 2022 16:07:34 +0200 [thread overview]
Message-ID: <20220421140740.459558-2-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <20220421140740.459558-1-benjamin.tissoires@redhat.com>
using fentry/fexit and fmod_ret is very convenient to access
module BPF capabilities, so be able to define kfuncs there is
a must.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
new in v4:
- I think this is where I need to add my new kfuncs, though
in the end I need to be able to change the incoming data, so
maybe only fmod_ret is the one we need to be able to be RW.
---
kernel/bpf/btf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 0493310d981f..76318a4c2d0e 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -202,6 +202,7 @@ enum btf_kfunc_hook {
BTF_KFUNC_HOOK_XDP,
BTF_KFUNC_HOOK_TC,
BTF_KFUNC_HOOK_STRUCT_OPS,
+ BTF_KFUNC_HOOK_TRACING,
BTF_KFUNC_HOOK_MAX,
};
@@ -6892,6 +6893,8 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type)
return BTF_KFUNC_HOOK_TC;
case BPF_PROG_TYPE_STRUCT_OPS:
return BTF_KFUNC_HOOK_STRUCT_OPS;
+ case BPF_PROG_TYPE_TRACING:
+ return BTF_KFUNC_HOOK_TRACING;
default:
return BTF_KFUNC_HOOK_MAX;
}
--
2.35.1
next prev parent reply other threads:[~2022-04-21 14:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 14:07 [RFC bpf-next v4 0/7] Introduce eBPF support for HID devices (new attempt) Benjamin Tissoires
2022-04-21 14:07 ` Benjamin Tissoires [this message]
2022-04-21 14:07 ` [RFC bpf-next v4 2/7] bpf/verifier: allow kfunc to return an allocated mem Benjamin Tissoires
2022-04-26 4:08 ` Alexei Starovoitov
2022-04-26 7:30 ` Benjamin Tissoires
2022-04-30 3:25 ` Alexei Starovoitov
2022-04-30 7:17 ` Benjamin Tissoires
2022-04-21 14:07 ` [RFC bpf-next v4 3/7] error-inject: add new type that carries if the function is non sleepable Benjamin Tissoires
2022-04-26 4:11 ` Alexei Starovoitov
2022-04-26 7:52 ` Benjamin Tissoires
2022-04-30 3:29 ` Alexei Starovoitov
2022-04-30 7:24 ` Benjamin Tissoires
2022-04-21 14:07 ` [RFC bpf-next v4 4/7] btf: Add a new kfunc set which allows to mark a function to be sleepable Benjamin Tissoires
2022-04-26 4:12 ` Alexei Starovoitov
2022-04-21 14:07 ` [RFC bpf-next v4 5/7] HID: initial BPF new way implementation Benjamin Tissoires
2022-04-26 4:19 ` Alexei Starovoitov
2022-04-21 14:07 ` [RFC bpf-next v4 6/7] samples/bpf: add new hid_mouse example Benjamin Tissoires
2022-04-21 14:07 ` [RFC bpf-next v4 7/7] selftests/bpf: add tests for the HID-bpf initial implementation Benjamin Tissoires
2022-04-26 4:03 ` [RFC bpf-next v4 0/7] Introduce eBPF support for HID devices (new attempt) Alexei Starovoitov
2022-04-26 7:20 ` Benjamin Tissoires
2022-04-30 3:00 ` Alexei Starovoitov
2022-04-30 7:12 ` Benjamin Tissoires
2022-05-02 21:43 ` Benjamin Tissoires
2022-05-12 4:16 ` Alexei Starovoitov
2022-05-13 16:59 ` Benjamin Tissoires
2022-05-12 4:23 ` Alexei Starovoitov
2022-05-13 17:02 ` Benjamin Tissoires
2022-05-13 19:42 ` Alexei Starovoitov
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=20220421140740.459558-2-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=tero.kristo@linux.intel.com \
--cc=yhs@fb.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.