Message ID | 20240315184849.2974556-1-yonghong.song@linux.dev (mailing list archive) |
---|---|
Headers | show |
Series | bpf: Allow helper bpf_get_[ns_]current_pid_tgid() for all prog types | expand |
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <andrii@kernel.org>: On Fri, 15 Mar 2024 11:48:49 -0700 you wrote: > Currently bpf_get_current_pid_tgid() is allowed in tracing, cgroup > and sk_msg progs while bpf_get_ns_current_pid_tgid() is only allowed > in tracing progs. > > We have an internal use case where for an application running > in a container (with pid namespace), user wants to get > the pid associated with the pid namespace in a cgroup bpf > program. Besides cgroup, the only prog type, supporting > bpf_get_current_pid_tgid() but not bpf_get_ns_current_pid_tgid(), > is sk_msg. > > [...] Here is the summary with links: - [bpf-next,v2,1/5] bpf: Allow helper bpf_get_[ns_]current_pid_tgid() for all prog types https://git.kernel.org/bpf/bpf-next/c/eb166e522c77 - [bpf-next,v2,2/5] selftests/bpf: Replace CHECK with ASSERT_* in ns_current_pid_tgid test https://git.kernel.org/bpf/bpf-next/c/84239a24d101 - [bpf-next,v2,3/5] selftests/bpf: Refactor out some functions in ns_current_pid_tgid test https://git.kernel.org/bpf/bpf-next/c/4d4bd29e363c - [bpf-next,v2,4/5] selftests/bpf: Add a cgroup prog bpf_get_ns_current_pid_tgid() test https://git.kernel.org/bpf/bpf-next/c/87ade6cd859e - [bpf-next,v2,5/5] selftests/bpf: Add a sk_msg prog bpf_get_ns_current_pid_tgid() test https://git.kernel.org/bpf/bpf-next/c/4c195ee4865d You are awesome, thank you!