lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZM_SrdpjnVr9ytAm_hpAW-WEvZ2EptAqwut_1jeAmyzA@mail.gmail.com>
Date: Thu, 1 May 2025 13:55:30 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: KaFai Wan <mannkafai@...il.com>
Cc: song@...nel.org, jolsa@...nel.org, ast@...nel.org, daniel@...earbox.net, 
	andrii@...nel.org, martin.lau@...ux.dev, eddyz87@...il.com, 
	yonghong.song@...ux.dev, john.fastabend@...il.com, kpsingh@...nel.org, 
	sdf@...ichev.me, haoluo@...gle.com, mattbobrowski@...gle.com, 
	rostedt@...dmis.org, mhiramat@...nel.org, mathieu.desnoyers@...icios.com, 
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	horms@...nel.org, mykolal@...com, shuah@...nel.org, 
	linux-kernel@...r.kernel.org, bpf@...r.kernel.org, 
	linux-trace-kernel@...r.kernel.org, netdev@...r.kernel.org, 
	linux-kselftest@...r.kernel.org, leon.hwang@...ux.dev
Subject: Re: [PATCH bpf-next 2/4] bpf: Enable BPF_PROG_TEST_RUN for tp_btf

On Sat, Apr 26, 2025 at 9:01 AM KaFai Wan <mannkafai@...il.com> wrote:
>
> Add .test_run for tp_btf. Use the .test_run for raw_tp.

Hm... so now you'll be able to pass arbitrary values as pointers to
kernel structs (e.g., arbitrary u64 as struct task_struct * pointer),
not sure this is a good idea...

>
> Signed-off-by: KaFai Wan <mannkafai@...il.com>
> ---
>  net/bpf/test_run.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
> index 8cb285187270..8c901ec92341 100644
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -690,6 +690,9 @@ int bpf_prog_test_run_tracing(struct bpf_prog *prog,
>         int b = 2, err = -EFAULT;
>         u32 retval = 0;
>
> +       if (prog->expected_attach_type == BPF_TRACE_RAW_TP)
> +               return bpf_prog_test_run_raw_tp(prog, kattr, uattr);
> +
>         if (kattr->test.flags || kattr->test.cpu || kattr->test.batch_size)
>                 return -EINVAL;
>
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ