From: Sedat Dilek <sedat.dilek@gmail.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Arnd Bergmann <arnd@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Desaulniers <ndesaulniers@google.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Wei Yang <richard.weiyang@linux.alibaba.com>,
Arnd Bergmann <arnd@arndb.de>, Vlastimil Babka <vbabka@suse.cz>,
Dmitry Safonov <0x7f454c46@gmail.com>,
Brian Geffon <bgeffon@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Clang-Built-Linux ML <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] mm/mremap: fix BUILD_BUG_ON() error in get_extent
Date: Tue, 12 Jan 2021 21:19:38 +0100 [thread overview]
Message-ID: <CA+icZUVRWowSyE17e1Gmdkdy+JetvaGW0y61MBOJ07W2N8QH=Q@mail.gmail.com> (raw)
In-Reply-To: <20210112191634.GA1587546@ubuntu-m3-large-x86>
On Tue, Jan 12, 2021 at 8:16 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Wed, Dec 30, 2020 at 04:40:40PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.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@arndb.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@gmail.com>
>
I have this patch in my custom 5.11 queue.
Feel free to add my:
Tested-by: Sedat Dilek <sedat.dilek@gmail.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@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210112191634.GA1587546%40ubuntu-m3-large-x86.
next prev parent reply other threads:[~2021-01-12 21:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 15:40 [PATCH] mm/mremap: fix BUILD_BUG_ON() error in get_extent Arnd Bergmann
2021-01-04 11:34 ` Vlastimil Babka
2021-01-04 22:36 ` Nathan Chancellor
2021-01-05 10:28 ` Arnd Bergmann
2021-01-12 19:16 ` Nathan Chancellor
2021-01-12 20:19 ` Sedat Dilek [this message]
2021-02-03 18:48 ` Nathan Chancellor
2021-02-03 20:03 ` Kees Cook
2021-02-05 19:00 ` Nathan Chancellor
2021-02-05 21:02 ` Andrew Morton
2021-02-05 21:27 ` Nathan Chancellor
2021-02-05 18:33 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+icZUVRWowSyE17e1Gmdkdy+JetvaGW0y61MBOJ07W2N8QH=Q@mail.gmail.com' \
--to=sedat.dilek@gmail.com \
--cc=0x7f454c46@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bgeffon@google.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=richard.weiyang@linux.alibaba.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).