Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2174674pxb; Fri, 5 Feb 2021 10:41:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrzPrAZLSRBI9fPOpq+bu8ioXVZiiaCQ++s1HCVqU0sHKlZsy8o2NnXk6flEG/73TgpCCk X-Received: by 2002:a17:906:f4f:: with SMTP id h15mr5342303ejj.498.1612550490245; Fri, 05 Feb 2021 10:41:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612550490; cv=none; d=google.com; s=arc-20160816; b=iah3CDJleCKyD8ClbWW+oGcp/Z7bI8auitoaXGKhe+o2t8cmGNCIlHJClpRwnWSwtM uwU0mv1TfBE1dxguA995AgUZ4ZsGtRDdVsPF8kjUTiffaKLL4cFqFKS6eOGbJ3Y0PPIb otbToOY/DAC32LQAHmQcJjcMRNfNoMaE24idQ8Y+AwQOeV2FSAnkFlD49gSrXaf0uYyo KRF9Runk80G98G9ofgp0dxI6zo9ZDFePjzwIYeQFq+YaL2S1t2nzt3U7DPP9DMXGKu8z lOcfYsFrcNNE2MNWsq3ROPDIoGJnMn5wdEnl3BQQPsR+vnYskKntptWuf68W4haEpncE Cm3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=h2QQGa7WmUtOnh1lnM8t/aGQgM70oTQkAKJTNVCw1J0=; b=mDqKtuIcbfQPFlq7qiNBPNpkRSJ5FjE+/CdOGn7dfNvqR/qqd8soapWzWLLlCgFe1i uTXSY86+Jbb4xVXY8BT4oA63xYOb5YlZ6k/XwY1mh9bkrkTeUlB+c74i/3UaliwMIYLj IBl1on/doXYpesS/DzvZVJ3MKeV28dTN8A4TE15c6YnJA4evvNdO/M4rmapQ8shrc4Gu cl47ZbfsnthEJRRcrdUJH0wPnS05blKZuudxAsuOdizOBAFixHLsMiOOV3NArf0tN5cU lX+lu4DFDe7n5TR36pngugaF0SxLFnCiFhzjJXyJXgTqLfFPrKQko1fNWWuo+P5AD15g Jkgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oh+oZFzj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s26si2940733edi.495.2021.02.05.10.41.05; Fri, 05 Feb 2021 10:41:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oh+oZFzj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233575AbhBEQz4 (ORCPT + 99 others); Fri, 5 Feb 2021 11:55:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbhBEQwM (ORCPT ); Fri, 5 Feb 2021 11:52:12 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D306CC061574 for ; Fri, 5 Feb 2021 10:33:53 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id m22so8930080ljj.4 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=HeO63FHtd2jLwS4ueUSfFHxI5tlTBQgsas5K++gnAzAbXoqagKmDHIXB6LpuEWQECl 9scr9LCAi5v/5fUb8NpaSwM50ofiA16MmcUaSpVzR9BWfni+X0GUEVvbOm3oA9xjHO42 5qDHKXMB6KmNT864bbQMGUIAVr2qDa6jI72qlWNy2hT9glpdHoxT2CTRPh5k/kt0MXnO mkQ23+BtzbvkZo9eBLoyy7O3Ul1g2ux3p3kHAW3sDayZvxg82WFMVL+Cqf7GgeC2GLGz Or6p7bu33s5c2zVngqkBgV/rs0Z7aYVQYXXBpeh/U9epfvWyzUENmRYb0W7UdunrqbfQ eejQ== X-Gm-Message-State: AOAM533HLL/tvCQGQoRyXbw1S1kdNUyuMGtKkq5BKgT1qrfrLlx6/7Fw f6Jht5hlPnLYW2/XYkfEmhfEkLT8q9iojYanZUyc4w== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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