Re: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-06-01 Thread Dan Carpenter
: https://lore.kernel.org/r/tencent_97F8B56B340F51DB604B482FEBF012460505%40qq.com patch subject: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc config: x86_64-randconfig-161-20250529 (https://download.01.org/0day-ci/archive/20250530/202505300432.nzc50gou-...@intel.com/config) compiler

Re: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-05-29 Thread Rong Tao
On 5/30/25 09:55, Yonghong Song wrote: On 5/29/25 6:28 PM, Rong Tao wrote: On 5/29/25 13:44, Alexei Starovoitov wrote: On Wed, May 28, 2025 at 8:37 PM Rong Tao wrote: From: Rong Tao It is a bit troublesome to get cwd based on pid in bpf program, such as bpftrace example [1]. This pa

Re: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-05-29 Thread Yonghong Song
On 5/29/25 6:28 PM, Rong Tao wrote: On 5/29/25 13:44, Alexei Starovoitov wrote: On Wed, May 28, 2025 at 8:37 PM Rong Tao wrote: From: Rong Tao It is a bit troublesome to get cwd based on pid in bpf program, such as bpftrace example [1]. This patch therefore adds a new bpf_task_cwd_from_

Re: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-05-29 Thread Rong Tao
On 5/29/25 13:44, Alexei Starovoitov wrote: On Wed, May 28, 2025 at 8:37 PM Rong Tao wrote: From: Rong Tao It is a bit troublesome to get cwd based on pid in bpf program, such as bpftrace example [1]. This patch therefore adds a new bpf_task_cwd_from_pid() kfunc which allows BPF programs t

Re: [PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-05-28 Thread Alexei Starovoitov
On Wed, May 28, 2025 at 8:37 PM Rong Tao wrote: > > From: Rong Tao > > It is a bit troublesome to get cwd based on pid in bpf program, such as > bpftrace example [1]. > > This patch therefore adds a new bpf_task_cwd_from_pid() kfunc which > allows BPF programs to get cwd from a pid. > > [1] https

[PATCH bpf-next 1/2] bpf: Add bpf_task_cwd_from_pid() kfunc

2025-05-28 Thread Rong Tao
From: Rong Tao It is a bit troublesome to get cwd based on pid in bpf program, such as bpftrace example [1]. This patch therefore adds a new bpf_task_cwd_from_pid() kfunc which allows BPF programs to get cwd from a pid. [1] https://github.com/bpftrace/bpftrace/issues/3314 Signed-off-by: Rong T