[an error occurred while processing this directive]
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: <ZPGjVl7jmLhMhgBP@calendula>
Date: Fri, 1 Sep 2023 10:39:50 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Felix Fietkau <nbd@....name>
Cc: netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC] netfilter: nf_tables: ignore -EOPNOTSUPP on flowtable
 device offload setup

Hi Felix,

On Thu, Aug 31, 2023 at 10:14:20PM +0200, Felix Fietkau wrote:
> On many embedded devices, it is common to configure flowtable offloading for
> a mix of different devices, some of which have hardware offload support and
> some of which don't.
> The current code limits the ability of user space to properly set up such a
> configuration by only allowing adding devices with hardware offload support to
> a offload-enabled flowtable.
> Given that offload-enabled flowtables also imply fallback to pure software
> offloading, this limitation makes little sense.
> Fix it by not bailing out when the offload setup returns -EOPNOTSUPP

Would you send a v2 to untoggle the offload flag when listing the
ruleset if EOPNOTSUPP is reported? Thus, the user knows that no
hardware offload is being used.

> Signed-off-by: Felix Fietkau <nbd@....name>
> ---
>  net/netfilter/nf_tables_api.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
> index 41b826dff6f5..dfa2ea98088b 100644
> --- a/net/netfilter/nf_tables_api.c
> +++ b/net/netfilter/nf_tables_api.c
> @@ -8103,7 +8103,7 @@ static int nft_register_flowtable_net_hooks(struct net *net,
>  		err = flowtable->data.type->setup(&flowtable->data,
>  						  hook->ops.dev,
>  						  FLOW_BLOCK_BIND);
> -		if (err < 0)
> +		if (err < 0 && err != -EOPNOTSUPP)
>  			goto err_unregister_net_hooks;
>  
>  		err = nf_register_net_hook(net, &hook->ops);
> -- 
> 2.41.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ