Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1119892pxj; Thu, 17 Jun 2021 23:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+GI8SrKeZ36xf1kXheBpSBv+zZgMyd81KOb4SDb3uNREBbQMWSmZC5FnQOMZYhdwQVKeX X-Received: by 2002:a05:6402:2694:: with SMTP id w20mr2729978edd.287.1623997262726; Thu, 17 Jun 2021 23:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623997262; cv=none; d=google.com; s=arc-20160816; b=uZNtBXlzPD1B9YgyHsm8pBnhUVJNwhtblmx9uVh1tgntj6jTQZVAWxVOffSW2h7Q2b SW5tTN2taej5T9sZEfVJ949Uglu1jrD63o1lnRcVfn9xuZkjHy1YQsQGQbYUCBl4ydc4 MOyChmx0N8PxBHd5yX7Uj7gLBnq+QSPu+lFI0Z05H8/9xI0IGCrT/+T2Q4h+ws/KuvQk lRDKSRhhn0VWNU0x9EJ0l0Wrme9KbfLikY3pYcpFDAP0xPypvrUcxEBg6pn/bx7al1oR zQardWvVbhFrZ+Wa0z3/rKycPXPhQ3TeZTbSbdCUdsBifjmHF038ZKbcfDMA8ZkuRTp4 VSwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=2ydnrkHBg6fnhjgCtI9cMXcSBTbhCcux5VKPTMhEzPM=; b=JerCTwnTWkfU+CcQA8o+5+vJkFfQRWTtfu4AzVWnPPtxcNgVQ6TEWxqCrSdfTw6Nd6 SO04tIlSQCwGvqJAnToreIi1xtHsdPJrF6G+0DcUITxpzzSpXMu+TEIx4m7GPszTRWlS WoTpqXWacdnptTnnjOT8a+mE9+ybV4FHIataw48NQ5N5OCbzgeLJDqXksYxJ0sH/CUV5 AEA1pKDMOPRG85oYsd5ZOEUOuSkDPvP3iDuARp/Uu4VKbsPa/G4HydVF5dWBEjC5FlSD YM9z6Nhr6WeRjhmRfmkHBDdoDXLDJiS4b5V/S2s7mC5GTxfwR+7AbvxAnUF+fj6KNy5F qtqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iLCmwTH6; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si7615895edx.220.2021.06.17.23.20.40; Thu, 17 Jun 2021 23:21:02 -0700 (PDT) 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=@ibm.com header.s=pp1 header.b=iLCmwTH6; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232253AbhFRFFa (ORCPT + 99 others); Fri, 18 Jun 2021 01:05:30 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:64678 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231193AbhFRFFa (ORCPT ); Fri, 18 Jun 2021 01:05:30 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15I4ekJV050542; Fri, 18 Jun 2021 01:02:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=2ydnrkHBg6fnhjgCtI9cMXcSBTbhCcux5VKPTMhEzPM=; b=iLCmwTH6TYfIN0rktEJvrjMDWaSWj67Igae6oIJ7PgnL9nZuK97i1Cnm9sLrcybxbpNb sDzBITj6K+CSDvloRuA7BW9JzyA5CHUcjjogKacALBot7RwkvA2DcRoTYUQftjSbHdoV 6Vo0FTjE7nPuOOcsBF4xkgevqysnlELCqph0z5N2K+0FAuLG9jL5vf08j5F/ttMvJ5/1 3cvQZqdqG3kO+iun7EVoG02qdg4HJZCxwDl8LItjMN/VV2AkWdDhhD+9N9Hz9Hklsfkr GvMshEV5RRSaPZOfqb0XkAenP7yaAFY3KGP7L7L+akf19JYkJ6BZC3JfBihZhB/Gl/2a HQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 398kdqt7he-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jun 2021 01:02:50 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15I4iMLe060784; Fri, 18 Jun 2021 01:02:49 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 398kdqt7gt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jun 2021 01:02:49 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15I4vWvX022039; Fri, 18 Jun 2021 05:02:47 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03ams.nl.ibm.com with ESMTP id 394mj8u371-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jun 2021 05:02:47 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15I52j1R31195526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Jun 2021 05:02:45 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8CBE74203F; Fri, 18 Jun 2021 05:02:45 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E5ED42045; Fri, 18 Jun 2021 05:02:43 +0000 (GMT) Received: from [9.77.205.195] (unknown [9.77.205.195]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 18 Jun 2021 05:02:43 +0000 (GMT) Subject: Re: [next] [clang] x86_64-linux-gnu-ld: mm/mremap.o: in function `move_pgt_entry': mremap.c:(.text+0x763): undefined reference to `__compiletime_assert_342' To: Nathan Chancellor , Andrew Morton Cc: Matthew Wilcox , Naresh Kamboju , linux-next@vger.kernel.org, clang-built-linux@googlegroups.com, lkft-triage@lists.linaro.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Arnd Bergmann , Stephen Rothwell References: From: "Aneesh Kumar K.V" Message-ID: <6f3c5317-2877-9a57-0126-e9305f000269@linux.ibm.com> Date: Fri, 18 Jun 2021 10:32:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: KhHjSAm-d0ZelsT_a4H8fgIMkznLNc1z X-Proofpoint-GUID: 6tc93sbjgoVTXTqU4G_PjrCr1DOBa4zE X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-17_17:2021-06-15,2021-06-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 adultscore=0 phishscore=0 impostorscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106180024 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/17/21 11:32 PM, Nathan Chancellor wrote: > Rebuilt the CC list because most people were added based on the > incorrect bisect result. > > On Thu, Jun 17, 2021 at 02:51:49PM +0100, Matthew Wilcox wrote: >> On Thu, Jun 17, 2021 at 06:15:45PM +0530, Naresh Kamboju wrote: >>> On Thu, 17 Jun 2021 at 17:41, Naresh Kamboju wrote: >>>> x86_64-linux-gnu-ld: mm/mremap.o: in function `move_pgt_entry': >>>> mremap.c:(.text+0x763): undefined reference to `__compiletime_assert_342' >>> >>> The git bisect pointed out the first bad commit. >>> >>> The first bad commit: >>> commit 928cf6adc7d60c96eca760c05c1000cda061604e >>> Author: Stephen Boyd >>> Date: Thu Jun 17 15:21:35 2021 +1000 >>> module: add printk formats to add module build ID to stacktraces >> >> Your git bisect probably went astray. There's no way that commit >> caused that regression. > > My bisect landed on commit 83f85ac75855 ("mm/mremap: convert huge PUD > move to separate helper"). flush_pud_tlb_range() evaluates to > BUILD_BUG() when CONFIG_TRANSPARENT_HUGEPAGE is unset but this function > is present just based on the value of > CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD. > > $ make -skj(nproc) ARCH=x86_64 CC=clang O=build/x86_64 distclean allnoconfig mm/mremap.o > > $ llvm-readelf -s build/x86_64/mm/mremap.o &| rg __compiletime_assert > 21: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __compiletime_assert_337 > > $ rg TRANSPARENT_ build/x86_64/.config > 450:CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y > 451:CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y > 562:# CONFIG_TRANSPARENT_HUGEPAGE is not set > > Not sure why this does not happen on newer clang versions, presumably > something with inlining decisions? Still seems like a legitimate issue > to me. > gcc 10 also doesn't give a build error. I guess that is because we evaluate if (pud_trans_huge(*old_pud) || pud_devmap(*old_pud)) { to if (0) with CONFIG_TRANSPARENT_HUGEPAGE disabled. switching that to if (1) do results in BUILD_BUG triggering. Should we fix this ? modified mm/mremap.c @@ -336,7 +336,7 @@ static inline bool move_normal_pud(struct vm_area_struct *vma, } #endif -#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD +#if defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) && defined(CONFIG_TRANSPARENT_HUGEPAGE) static bool move_huge_pud(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, pud_t *old_pud, pud_t *new_pud) {