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=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 36F85C48BE0 for ; Fri, 11 Jun 2021 16:56:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BB37060FDB for ; Fri, 11 Jun 2021 16:56:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB37060FDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 52AEB6B0036; Fri, 11 Jun 2021 12:56:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DB986B006C; Fri, 11 Jun 2021 12:56:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37B586B006E; Fri, 11 Jun 2021 12:56:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id 08E046B0036 for ; Fri, 11 Jun 2021 12:56:32 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 99255181AEF3C for ; Fri, 11 Jun 2021 16:56:32 +0000 (UTC) X-FDA: 78242046624.23.5142D62 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf22.hostedemail.com (Postfix) with ESMTP id E533BC005A20 for ; Fri, 11 Jun 2021 16:56:25 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id E520C613C3; Fri, 11 Jun 2021 16:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623430591; bh=dOiRv2EVX4APauf/Fg0xDKOOIUavy0zpsQYWWhM5Kf8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lKT7CBhk2MlKRj5hxYFLLXN3RSfKwNk7UsMTbvAB4kohfIyymqyJHsbpsRQEP6Jq6 XKfa6jETRMqnC9FvimXLFvCly+uQw0c7/yT8kvAno3J5fiiD5w0k6wYv5qRiJ+JM/P hHPIWQd+g7tiNx6eybBFRMKdyYop77P9Q5iJrKVNfUEoSbKd69wNPei9J1MMyAFQLZ RezYr3C2vWVe6uivGiBWsMPMkFZ3KLAlkP3kChbwqwdXO65VYKeZL9dHE9W3xBi7aE ovvkSFJgSPruZP4NqQV2ThKw3ksFz+6Bi5yw3ECOOCBxDiNPwm20B6EhXHkek+UHZA 6HrbOr82JsSnw== Subject: Re: [linux-next:master 7012/7430] include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_183' declared with attribute error: unexpected size in kmalloc_index() To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Vlastimil Babka Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton , Nick Desaulniers , clang-built-linux@googlegroups.com References: <202106051442.G1VJubTz-lkp@intel.com> <20210606110839.GA13828@hyeyoo> <20210607122550.GA752464@hyeyoo> <06af75da-ffe9-7070-1da8-bcb2cb7881d2@suse.cz> <20210607154957.GB927582@hyeyoo> <6e1d48f2-409c-0a71-4d04-a907fe4183b8@suse.cz> <20210608170528.GA28015@hyeyoo> <2d2d792e-e189-99a4-36cb-f1473a4df9ad@suse.cz> <20210608184501.GA5505@hyeyoo> <513f82e6-175c-d040-691c-5d0e7dacfb83@suse.cz> From: Nathan Chancellor Message-ID: <99de1f59-1e38-6410-86ff-0ea1f016c49f@kernel.org> Date: Fri, 11 Jun 2021 09:56:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; 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 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=lKT7CBhk; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf22.hostedemail.com: domain of nathan@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=nathan@kernel.org X-Stat-Signature: m511xio6cnxzx8yjko9xxjhk6cfd58yu X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E533BC005A20 X-HE-Tag: 1623430585-694575 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 6/11/2021 1:58 AM, Hyeonggon Yoo wrote:> After playing with clang more a bit, I got to know that > compiletime_assert makes weird link error (undefined reference to > compiletime_assert_XXX), Not a compile error. > > > I think it's time to CC ClangBuiltLinux maintainers, who work on > clang/llvm build support. > > [+CC Nathan and Nick] > > I assumeed that compiletime_assert (in linux/compiler.h) will make > compiler error, but it makes no compile error, just makes weird link error. > > I'm not sure it it works well with clang, or somewhat buggy status? I am guessing this alone is why we were keyed into the thread so I am just going to respond to this. Unfortunately, this is a known issue with clang: https://github.com/ClangBuiltLinux/linux/issues/1173 https://bugs.llvm.org/show_bug.cgi?id=16428 As you noticed, building the full kernel will result in a link error but it would certainly be nicer if it were a compiler error. Something for us to improve indeed but I am not sure when we will be able to allocate resources for that. Until then, you can build a full kernel to get the failing translation unit then use nm or readelf when building the single translation unit to see if there are any "__compiletime_assert" symbols. Cheers, Nathan