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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 10 Feb 2021 12:27:38 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Martin KaFai Lau <kafai@...com>
Cc:     bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>,
        Networking <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf 2/2] bpf: selftests: Add non function pointer test to struct_ops

On Tue, Feb 9, 2021 at 12:11 PM Martin KaFai Lau <kafai@...com> wrote:
>
> This patch adds a "void *owner" member.  The existing
> bpf_tcp_ca test will ensure the bpf_cubic.o and bpf_dctcp.o
> can be loaded.
>
> Signed-off-by: Martin KaFai Lau <kafai@...com>
> ---

Acked-by: Andrii Nakryiko <andrii@...nel.org>

What will happen if BPF code initializes such non-func ptr member?
Will libbpf complain or just ignore those values? Ignoring initialized
members isn't great.

>  tools/testing/selftests/bpf/bpf_tcp_helpers.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/bpf/bpf_tcp_helpers.h b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
> index 6a9053162cf2..91f0fac632f4 100644
> --- a/tools/testing/selftests/bpf/bpf_tcp_helpers.h
> +++ b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
> @@ -177,6 +177,7 @@ struct tcp_congestion_ops {
>          * after all the ca_state processing. (optional)
>          */
>         void (*cong_control)(struct sock *sk, const struct rate_sample *rs);
> +       void *owner;
>  };
>
>  #define min(a, b) ((a) < (b) ? (a) : (b))
> --
> 2.24.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ