From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73FB6C433E0 for ; Fri, 5 Feb 2021 18:33:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C331C64F0D for ; Fri, 5 Feb 2021 18:33:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C331C64F0D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1EEF36B0070; Fri, 5 Feb 2021 13:33:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 19F9F6B0071; Fri, 5 Feb 2021 13:33:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08EE26B0073; Fri, 5 Feb 2021 13:33:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id E4E226B0070 for ; Fri, 5 Feb 2021 13:33:54 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A97FE180AD802 for ; Fri, 5 Feb 2021 18:33:54 +0000 (UTC) X-FDA: 77785063188.28.wing04_49004e2275e7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 8AAE76C29 for ; Fri, 5 Feb 2021 18:33:54 +0000 (UTC) X-HE-Tag: wing04_49004e2275e7 X-Filterd-Recvd-Size: 4865 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 18:33:53 +0000 (UTC) Received: by mail-lj1-f182.google.com with SMTP id t8so8886148ljk.10 for ; Fri, 05 Feb 2021 10:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h2QQGa7WmUtOnh1lnM8t/aGQgM70oTQkAKJTNVCw1J0=; b=oh+oZFzjEuM+WbroVeB3HQV7hp2UCvADxOpOuw/cUcJTqpwumRgyw3gbB++TWQaGwZ e5VWAU63IaiI8ZtEQsfv6l0CJ+PBEKZSJnFumrGK5urxe7vi93WBugqZhQHtBKJf0Wcl a22kxN8KCmc3cuM9+Br4GjvzGhleotknV3rdlcKMFEGwSnVu+p9X4eQXT5jYyFA7o9w0 LgfPIQRHj28tLA4ugPIpQr/y6c1IZxsVkAMGY0MkdMnGSJyPBS18qUQlrDt+QRXHvHnG XhU2Ll4ZTjCmZhGPk7wuKDQWC9frJH7BTz8xW6GwqO5Q0h8mCNegD/NHVVUu1pW/l3Ju Dwjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h2QQGa7WmUtOnh1lnM8t/aGQgM70oTQkAKJTNVCw1J0=; b=V1pM37Y/3nCxE7Hx9iNWqTnbs7+apHWYL2tPX2cJrMdNy5N75QuYOpXmaxIFGgG439 ZMWC8P2UAlJuUWE6TvU4MzlEH7Xdr8KnJurnG0Ie1274h/jBa1c4rUvA8IAAZPwado5G 3b4SY5L38nkXUpwOGIMG7roQUp9gJunE7i30mCGolPiCgLaAXYhCU/axt86bK/LySMKs sc6eYdG8ToCG0l63hxRtNTtpm1ggKpWqI3XoC03d/zMmSZkPFYCLWlaAJsiWgg8uJyxU nh4X5Trl/bAWoXxbw+trXR42fTz3czsB31KgUV7eXQ6PUMEjqh05ZGcQnVSn9LkalcmI UsPA== X-Gm-Message-State: AOAM531XVzTcpxBBOO4zNPmAVU77l4PCcL+Tm1A0F4VaEhFerAC4YvpB UI6Vra/JW+rOvSAfee8iDTIMiuUx8ILfPhod/hIzpQ== X-Google-Smtp-Source: ABdhPJywatE7yc2UsD9fVqwCCiumk5bBJtELN+1itqTf5Df3lBAQZy/8ldu4LxetnWwOMwoKCP051SKEcDaqaI5LnbI= X-Received: by 2002:a2e:1519:: with SMTP id s25mr3379949ljd.495.1612550032109; Fri, 05 Feb 2021 10:33:52 -0800 (PST) MIME-Version: 1.0 References: <20201230154104.522605-1-arnd@kernel.org> In-Reply-To: <20201230154104.522605-1-arnd@kernel.org> From: Nick Desaulniers Date: Fri, 5 Feb 2021 10:33:39 -0800 Message-ID: Subject: Re: [PATCH] mm/mremap: fix BUILD_BUG_ON() error in get_extent To: Arnd Bergmann , Andrew Morton Cc: Nathan Chancellor , "Kirill A. Shutemov" , Wei Yang , Arnd Bergmann , Vlastimil Babka , Dmitry Safonov <0x7f454c46@gmail.com>, Brian Geffon , Linux Memory Management List , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Dec 30, 2020 at 7:41 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > 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 Tested-by: Nick Desaulniers > --- > 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/20201230154104.522605-1-arnd%40kernel.org. -- Thanks, ~Nick Desaulniers