[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHS8izMfFPkXU5Wx7i7af2c2=nVzZ_GJnoj0YyLugKDr5uAyjQ@mail.gmail.com>
Date: Fri, 13 Sep 2024 14:38:45 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Jesper Dangaard Brouer <hawk@...nel.org>, Ilias Apalodimas <ilias.apalodimas@...aro.org>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>, Linux Next Mailing List <linux-next@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>, Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH net-next v2] page_pool: fix build on powerpc with GCC 14
On Fri, Sep 13, 2024 at 2:33 PM Mina Almasry <almasrymina@...gle.com> wrote:
>
> Building net-next with powerpc with GCC 14 compiler results in this
> build error:
>
> /home/sfr/next/tmp/ccuSzwiR.s: Assembler messages:
> /home/sfr/next/tmp/ccuSzwiR.s:2579: Error: operand out of domain (39 is
> not a multiple of 4)
> make[5]: *** [/home/sfr/next/next/scripts/Makefile.build:229:
> net/core/page_pool.o] Error 1
>
> Root caused in this thread:
> https://lore.kernel.org/netdev/913e2fbd-d318-4c9b-aed2-4d333a1d5cf0@cs-soprasteria.com/
>
> We try to access offset 40 in the pointer returned by this function:
>
> static inline unsigned long _compound_head(const struct page *page)
> {
> unsigned long head = READ_ONCE(page->compound_head);
>
> if (unlikely(head & 1))
> return head - 1;
> return (unsigned long)page_fixed_fake_head(page);
> }
>
> The GCC 14 (but not 11) compiler optimizes this by doing:
>
> ld page + 39
>
> Rather than:
>
> ld (page - 1) + 40
>
> And causing an unaligned load. Get around this by issuing a READ_ONCE as
> we convert the page to netmem. That disables the compiler optimizing the
> load in this way.
>
> Cc: Simon Horman <horms@...nel.org>
> Cc: Stephen Rothwell <sfr@...b.auug.org.au>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: David Miller <davem@...emloft.net>
> Cc: Paolo Abeni <pabeni@...hat.com>
> Cc: Networking <netdev@...r.kernel.org>
> Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
> Cc: Linux Next Mailing List <linux-next@...r.kernel.org>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
> Cc: Matthew Wilcox <willy@...radead.org>
>
> Suggested-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Mina Almasry <almasrymina@...gle.com>
>
Gah, right after I hit send I realized I missed the 24hr rule.
Although I'm unsure about the urgency of build fixes. Sorry about
that.
--
Thanks,
Mina
Powered by blists - more mailing lists