|
@@ -312,6 +312,17 @@ const struct bpf_func_proto *bpf_get_event_output_proto(void)
|
|
return &bpf_event_output_proto;
|
|
return &bpf_event_output_proto;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static u64 bpf_get_current_task(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5)
|
|
|
|
+{
|
|
|
|
+ return (long) current;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static const struct bpf_func_proto bpf_get_current_task_proto = {
|
|
|
|
+ .func = bpf_get_current_task,
|
|
|
|
+ .gpl_only = true,
|
|
|
|
+ .ret_type = RET_INTEGER,
|
|
|
|
+};
|
|
|
|
+
|
|
static const struct bpf_func_proto *tracing_func_proto(enum bpf_func_id func_id)
|
|
static const struct bpf_func_proto *tracing_func_proto(enum bpf_func_id func_id)
|
|
{
|
|
{
|
|
switch (func_id) {
|
|
switch (func_id) {
|
|
@@ -329,6 +340,8 @@ static const struct bpf_func_proto *tracing_func_proto(enum bpf_func_id func_id)
|
|
return &bpf_tail_call_proto;
|
|
return &bpf_tail_call_proto;
|
|
case BPF_FUNC_get_current_pid_tgid:
|
|
case BPF_FUNC_get_current_pid_tgid:
|
|
return &bpf_get_current_pid_tgid_proto;
|
|
return &bpf_get_current_pid_tgid_proto;
|
|
|
|
+ case BPF_FUNC_get_current_task:
|
|
|
|
+ return &bpf_get_current_task_proto;
|
|
case BPF_FUNC_get_current_uid_gid:
|
|
case BPF_FUNC_get_current_uid_gid:
|
|
return &bpf_get_current_uid_gid_proto;
|
|
return &bpf_get_current_uid_gid_proto;
|
|
case BPF_FUNC_get_current_comm:
|
|
case BPF_FUNC_get_current_comm:
|