Re: nft_pipapo_avx2_lookup backtrace in linux 5.10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 7 May 2021 12:35:23 +0200
Florian Westphal <fw@xxxxxxxxx> wrote:

> Arturo Borrero Gonzalez <arturo@xxxxxxxxxxxxx> wrote:
> > Hi there,
> > 
> > I got this backtrace in one of my servers. I wonder if it is known or fixed
> > already in a later version.
> > 
> > My versions:
> > * kernel 5.10.24
> > * nft 0.9.6
> > 
> > Also, find attached the ruleset that triggered this.
> > 
> > [Thu May  6 16:20:21 2021] ------------[ cut here ]------------
> > [Thu May  6 16:20:21 2021] WARNING: CPU: 3 PID: 456 at
> > arch/x86/kernel/fpu/core.c:129 kernel_fpu_begin_mask+0xc9/0xe0
> > [Thu May  6 16:20:21 2021] Modules linked in: binfmt_misc nft_nat  
> 
> Hmm, I suspect this is needed (not even compile tested).
> 
> diff --git a/net/netfilter/nft_set_pipapo_avx2.c b/net/netfilter/nft_set_pipapo_avx2.c
> --- a/net/netfilter/nft_set_pipapo_avx2.c
> +++ b/net/netfilter/nft_set_pipapo_avx2.c
> @@ -1105,6 +1105,18 @@ bool nft_pipapo_avx2_estimate(const struct nft_set_desc *desc, u32 features,
>  	return true;
>  }
>  
> +static void nft_pipapo_avx_begin(void)
> +{
> +	local_bh_disable();
> +	kernel_fpu_begin();
> +}
>
> [...]
> 
> kernel_fpu_begin() disables preemption, but we can still reenter via
> softirq.

Right... if that's enough (I'm quite convinced), and the overhead is
negligible (not as much... I'll test), I would prefer this to the
fallback option on !irq_fpu_usable() -- it's simpler.

-- 
Stefano




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux