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: <dc994c7b-c8fe-df8e-7203-0d6dae8dee9f@iogearbox.net>
Date:   Fri, 14 Apr 2023 23:59:57 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Lorenzo Bianconi <lorenzo@...nel.org>, bpf@...r.kernel.org
Cc:     netdev@...r.kernel.org, lorenzo.bianconi@...hat.com,
        ast@...nel.org, andrii@...nel.org, martin.lau@...ux.dev,
        joamaki@...il.com
Subject: Re: [PATCH bpf] selftests/bpf: fix xdp_redirect xdp-features for
 xdp_bonding selftest

On 4/14/23 11:21 PM, Lorenzo Bianconi wrote:
> NETDEV_XDP_ACT_NDO_XMIT is not enabled by default for veth driver but it
> depends on the device configuration. Fix XDP_REDIRECT xdp-features in
> xdp_bonding selftest loading a dummy XDP program on veth2_2 device.
> 
> Fixes: fccca038f300 ("veth: take into account device reconfiguration for xdp_features flag")

Hm, does that mean we're changing^breaking existing user behavior iff after
fccca038f300 you can only make it work by loading dummy prog?

> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
>   tools/testing/selftests/bpf/prog_tests/xdp_bonding.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c b/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
> index 5e3a26b15ec6..dcbe30c81291 100644
> --- a/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
> +++ b/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
> @@ -168,6 +168,17 @@ static int bonding_setup(struct skeletons *skeletons, int mode, int xmit_policy,
>   
>   		if (xdp_attach(skeletons, skeletons->xdp_dummy->progs.xdp_dummy_prog, "veth1_2"))
>   			return -1;
> +
> +		if (!ASSERT_OK(setns_by_name("ns_dst"), "set netns to ns_dst"))
> +			return -1;
> +
> +		/* Load a dummy XDP program on veth2_2 in order to enable
> +		 * NETDEV_XDP_ACT_NDO_XMIT feature
> +		 */
> +		if (xdp_attach(skeletons, skeletons->xdp_dummy->progs.xdp_dummy_prog, "veth2_2"))
> +			return -1;
> +
> +		restore_root_netns();
>   	}
>   
>   	SYS("ip -netns ns_dst link set veth2_1 master bond2");
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ