Subject: Re: [PATCH] netfilter: nf_tables: Add __percpu annotation to *stats pointer in nf_tables_updchain()

From: Pablo Neira Ayuso <[email-masked]>
Date: Wed, 28 Aug 2024 23:51:33 +0200

On Wed, Aug 28, 2024 at 09:29:14PM +0200, Uros Bizjak wrote:
> On Wed, Aug 28, 2024 at 4:53 PM Pablo Neira Ayuso <[email-masked]> wrote:
> >
> > On Tue, Aug 06, 2024 at 12:26:58PM +0200, Uros Bizjak wrote:
> > > Compiling nf_tables_api.c results in several sparse warnings:
> > >
> > > nf_tables_api.c:2740:23: warning: incorrect type in assignment (different address spaces)
> > > nf_tables_api.c:2752:38: warning: incorrect type in assignment (different address spaces)
> > > nf_tables_api.c:2798:21: warning: incorrect type in argument 1 (different address spaces)
> > >
> > > Add __percpu annotation to *stats pointer to fix these warnings.
> > >
> > > Found by GCC's named address space checks.
> > >
> > > There were no changes in the resulting object files.
> >
> > I never replied to this.
> >
> > I can see this is getting things better, but still more sparse
> > warnings show up related tho nft_stats. I'd prefer those are fixed at
> > ones, would you give it a look?
> 
> Yes, I have a follow-up patch that also fixes the remaining warnings,
> but it depends on a patch [1] that is on the way to mainline through
> the mm tree.
> 
> I can post the complete patch that uses percpu variants of ERR_PTR,
> IS_ERR and PTR_ERR where needed if this dependency can temporarily be
> tolerated.
> 
> [1] https://lore.kernel.org/lkml/[email-masked]/

Thanks for explaining.

Post the patch to [email-masked] explaining the
dependency so it sits there and I remember about it while it gets
upstream.

If there is any issue and this patch does not reach mm tree, let me
know.

Thanks