Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Introduce a new bpf helper of bpf_task_under_cgroup
@ 2023-04-20  7:26 Feng zhou
  2023-04-20  7:26 ` [PATCH bpf-next 1/2] bpf: Add bpf_task_under_cgroup helper Feng zhou
  2023-04-20  7:26 ` [PATCH bpf-next 2/2] selftests/bpf: Add testcase for bpf_task_under_cgroup Feng zhou
  0 siblings, 2 replies; 5+ messages in thread
From: Feng zhou @ 2023-04-20  7:26 UTC (permalink / raw)
  To: martin.lau, ast, daniel, andrii, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa, davem, edumazet, kuba, pabeni,
	mykolal, shuah
  Cc: bpf, linux-kernel, netdev, linux-kselftest, yangzhenze,
	wangdongdong.6, zhoufeng.zf

From: Feng Zhou <zhoufeng.zf@bytedance.com>

Trace sched related functions, such as enqueue_task_fair, it is necessary to
specify a task instead of the current task which within a given cgroup to a map.

Feng Zhou (2):
  bpf: Add bpf_task_under_cgroup helper
  selftests/bpf: Add testcase for bpf_task_under_cgroup

 include/uapi/linux/bpf.h                      | 13 +++++
 kernel/bpf/verifier.c                         |  4 +-
 kernel/trace/bpf_trace.c                      | 31 ++++++++++++
 tools/include/uapi/linux/bpf.h                | 13 +++++
 .../bpf/prog_tests/task_under_cgroup.c        | 49 +++++++++++++++++++
 .../bpf/progs/test_task_under_cgroup.c        | 31 ++++++++++++
 6 files changed, 140 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_task_under_cgroup.c

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-21  2:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20  7:26 [PATCH bpf-next 0/2] Introduce a new bpf helper of bpf_task_under_cgroup Feng zhou
2023-04-20  7:26 ` [PATCH bpf-next 1/2] bpf: Add bpf_task_under_cgroup helper Feng zhou
2023-04-20 18:22   ` Alexei Starovoitov
2023-04-21  2:31     ` [External] " Feng Zhou
2023-04-20  7:26 ` [PATCH bpf-next 2/2] selftests/bpf: Add testcase for bpf_task_under_cgroup Feng zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox