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] [day] [month] [year] [list]
Message-ID: <CAADnVQ+yTZkfC=6Vw3+P9OA2iqzB02OhYTwWWCBGKLy_EfvQKA@mail.gmail.com>
Date: Wed, 27 Nov 2024 18:43:30 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: "David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Simon Horman <horms@...nel.org>, Martin KaFai Lau <martin.lau@...nel.org>, 
	Kui-Feng Lee <thinker.li@...il.com>, Alexei Starovoitov <ast@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, 
	Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, 
	Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>, 
	Yonghong Song <yonghong.song@...ux.dev>, KP Singh <kpsingh@...nel.org>, 
	Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>, 
	Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires <bentiss@...nel.org>, Tejun Heo <tj@...nel.org>, 
	David Vernet <void@...ifault.com>, Ingo Molnar <mingo@...hat.com>, 
	Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>, 
	Vincent Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann <dietmar.eggemann@....com>, 
	Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, 
	Valentin Schneider <vschneid@...hat.com>, Network Development <netdev@...r.kernel.org>, 
	LKML <linux-kernel@...r.kernel.org>, bpf <bpf@...r.kernel.org>, 
	"open list:HID CORE LAYER" <linux-input@...r.kernel.org>
Subject: Re: [PATCH bpf-next 2/9] bpf: Move func_models from bpf_struct_ops to bpf_struct_ops_desc

On Wed, Nov 27, 2024 at 11:20 AM Thomas Weißschuh <linux@...ssschuh.net> wrote:
>
> --- a/net/bpf/bpf_dummy_struct_ops.c
> +++ b/net/bpf/bpf_dummy_struct_ops.c
> @@ -129,7 +129,7 @@ extern const struct bpf_link_ops bpf_struct_ops_link_lops;
>  int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
>                             union bpf_attr __user *uattr)
>  {
> -       const struct bpf_struct_ops *st_ops = &bpf_bpf_dummy_ops;
> +       static typeof_member(struct bpf_struct_ops_desc, func_models) func_models;
>         const struct btf_type *func_proto;
>         struct bpf_dummy_ops_test_args *args;
>         struct bpf_tramp_links *tlinks = NULL;
> @@ -175,7 +175,7 @@ int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
>
>         op_idx = prog->expected_attach_type;
>         err = bpf_struct_ops_prepare_trampoline(tlinks, link,
> -                                               &st_ops->func_models[op_idx],
> +                                               &func_models[op_idx],

This is sad. You didn't bother running the tests.
Above is producing garbage.
That's why so many BPF CI tests are failing.

Overall I think it's a minimal positive value to constify struct_ops.
Unless other bpf developers see a huge value
I'd prefer to keep the code as-is.

pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ