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: <20240723094458.GC24657@kernel.org>
Date: Tue, 23 Jul 2024 10:44:58 +0100
From: Simon Horman <horms@...nel.org>
To: Artem Savkov <asavkov@...hat.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Andrii Nakryiko <andrii@...nel.org>, bpf@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next v3] selftests/bpf: fix compilation failure when
 CONFIG_NET_FOU!=y

On Tue, Jul 23, 2024 at 09:10:31AM +0200, Artem Savkov wrote:
> Without CONFIG_NET_FOU bpf selftests are unable to build because of
> missing definitions. Add ___local versions of struct bpf_fou_encap and
> enum bpf_fou_encap_type to fix the issue.
> 
> Signed-off-by: Artem Savkov <asavkov@...hat.com>
> 
> ---
> v3: swith from using BPF_NO_KFUNC_PROTOTYPES to casting to keep kfunc
> prototype intact.
> 
> v2: added BPF_NO_KFUNC_PROTOTYPES define to avoid issues when
> CONFIG_NET_FOU is set.
> ---
>  .../selftests/bpf/progs/test_tunnel_kern.c    | 26 ++++++++++++++-----
>  1 file changed, 20 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/progs/test_tunnel_kern.c b/tools/testing/selftests/bpf/progs/test_tunnel_kern.c
> index 3f5abcf3ff136..fcff3010d8a60 100644
> --- a/tools/testing/selftests/bpf/progs/test_tunnel_kern.c
> +++ b/tools/testing/selftests/bpf/progs/test_tunnel_kern.c
> @@ -26,6 +26,18 @@
>   */
>  #define ASSIGNED_ADDR_VETH1 0xac1001c8
>  
> +struct bpf_fou_encap___local {
> +       __be16 sport;
> +       __be16 dport;
> +};
> +
> +enum bpf_fou_encap_type___local {
> +       FOU_BPF_ENCAP_FOU___local,
> +       FOU_BPF_ENCAP_GUE___local,
> +};

nit: The above use spaces rather than tabs for indentation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ