[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUVRWowSyE17e1Gmdkdy+JetvaGW0y61MBOJ07W2N8QH=Q@mail.gmail.com>
Date: Tue, 12 Jan 2021 21:19:38 +0100
From: Sedat Dilek <sedat.dilek@...il.com>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Arnd Bergmann <arnd@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Wei Yang <richard.weiyang@...ux.alibaba.com>,
Arnd Bergmann <arnd@...db.de>,
Vlastimil Babka <vbabka@...e.cz>,
Dmitry Safonov <0x7f454c46@...il.com>,
Brian Geffon <bgeffon@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Clang-Built-Linux ML <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] mm/mremap: fix BUILD_BUG_ON() error in get_extent
On Tue, Jan 12, 2021 at 8:16 PM Nathan Chancellor
<natechancellor@...il.com> wrote:
>
> On Wed, Dec 30, 2020 at 04:40:40PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > clang cannt evaluate this function argument at compile time
> > when the function is not inlined, which leads to a link
> > time failure:
> >
> > ld.lld: error: undefined symbol: __compiletime_assert_414
> > >>> referenced by mremap.c
> > >>> mremap.o:(get_extent) in archive mm/built-in.a
> >
> > Mark the function as __always_inline to avoid it.
> >
> > Fixes: 9ad9718bfa41 ("mm/mremap: calculate extent in one place")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
>
> I would like to see some movement on getting this fixed in 5.11. As it
> stands, this is one of three __compiletime_assert references with
> CONFIG_UBSAN_UNSIGNED_OVERFLOW. If we want to keep the BUILD_BUG()
> around, I think this is fine. Alternatively, turning it into a runtime
> check would be fine too.
>
> Reviewed-by: Nathan Chancellor <natechancellor@...il.com>
>
I have this patch in my custom 5.11 queue.
Feel free to add my:
Tested-by: Sedat Dilek <sedat.dilek@...il.com>
- Sedat -
> > ---
> > mm/mremap.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/mm/mremap.c b/mm/mremap.c
> > index c5590afe7165..1cb464a07184 100644
> > --- a/mm/mremap.c
> > +++ b/mm/mremap.c
> > @@ -336,8 +336,9 @@ enum pgt_entry {
> > * valid. Else returns a smaller extent bounded by the end of the source and
> > * destination pgt_entry.
> > */
> > -static unsigned long get_extent(enum pgt_entry entry, unsigned long old_addr,
> > - unsigned long old_end, unsigned long new_addr)
> > +static __always_inline unsigned long get_extent(enum pgt_entry entry,
> > + unsigned long old_addr, unsigned long old_end,
> > + unsigned long new_addr)
> > {
> > unsigned long next, extent, mask, size;
> >
> > --
> > 2.29.2
>
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@...glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210112191634.GA1587546%40ubuntu-m3-large-x86.
Powered by blists - more mailing lists