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.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 0BF6FC47082 for ; Mon, 7 Jun 2021 15:27:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98AE161164 for ; Mon, 7 Jun 2021 15:27:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98AE161164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EFCDA6B0036; Mon, 7 Jun 2021 11:27:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EAC9D6B006E; Mon, 7 Jun 2021 11:27:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFE996B0070; Mon, 7 Jun 2021 11:27:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id 9A50E6B0036 for ; Mon, 7 Jun 2021 11:27:29 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 38D488249980 for ; Mon, 7 Jun 2021 15:27:29 +0000 (UTC) X-FDA: 78227307018.02.0110AF9 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf30.hostedemail.com (Postfix) with ESMTP id 73D00E000261 for ; Mon, 7 Jun 2021 15:27:27 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A6BD821A8A; Mon, 7 Jun 2021 15:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623079647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nb/rNOY97xKNtyBsNIq4Q3GGAoE1ExxNae1y3293VE4=; b=WfTbvkMjopJc1dEjTshSyMAw6O72TkLbApMnnElo4x385++nz5NZhHfG2EvE3CHjJ8Rdn5 zSWdJPk3wynWaum4m27oWL8nt8Qox2RGhZKhjDYtTjsZEOICUFhcA/+14JR6sEOL8iwIOX WQGDsLdZhrBnTPrGJwVKMHsQD3m4z4c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623079647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nb/rNOY97xKNtyBsNIq4Q3GGAoE1ExxNae1y3293VE4=; b=IgSI9DuKJhDrEjAb0OJUzAqjaMXWg3vJiUerk5adntvwwJ3yTsDWZWTszkHpGU4MXx5dmY FhEOVoEL152sReAQ== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 8736E118DD; Mon, 7 Jun 2021 15:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623079647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nb/rNOY97xKNtyBsNIq4Q3GGAoE1ExxNae1y3293VE4=; b=WfTbvkMjopJc1dEjTshSyMAw6O72TkLbApMnnElo4x385++nz5NZhHfG2EvE3CHjJ8Rdn5 zSWdJPk3wynWaum4m27oWL8nt8Qox2RGhZKhjDYtTjsZEOICUFhcA/+14JR6sEOL8iwIOX WQGDsLdZhrBnTPrGJwVKMHsQD3m4z4c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623079647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nb/rNOY97xKNtyBsNIq4Q3GGAoE1ExxNae1y3293VE4=; b=IgSI9DuKJhDrEjAb0OJUzAqjaMXWg3vJiUerk5adntvwwJ3yTsDWZWTszkHpGU4MXx5dmY FhEOVoEL152sReAQ== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id vv51IN86vmCLbAAALh3uQQ (envelope-from ); Mon, 07 Jun 2021 15:27:27 +0000 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> Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton References: <202106051442.G1VJubTz-lkp@intel.com> <20210606110839.GA13828@hyeyoo> <20210607122550.GA752464@hyeyoo> From: Vlastimil Babka Message-ID: <06af75da-ffe9-7070-1da8-bcb2cb7881d2@suse.cz> Date: Mon, 7 Jun 2021 17:27:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210607122550.GA752464@hyeyoo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 73D00E000261 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=WfTbvkMj; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IgSI9DuK; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=WfTbvkMj; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IgSI9DuK; dmarc=none; spf=pass (imf30.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Stat-Signature: wj7ewso4t6ppgsbrwznkp56zpuo4tqbw X-HE-Tag: 1623079647-738941 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/7/21 2:25 PM, Hyeonggon Yoo wrote: > On Mon, Jun 07, 2021 at 01:40:02PM +0200, Vlastimil Babka wrote: >> On 6/6/21 1:08 PM, Hyeonggon Yoo wrote: >> > On Sat, Jun 05, 2021 at 02:10:46PM +0800, kernel test robot wrote: >> >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master >> >> head: ccc252d2e818f6a479441119ad453c3ce7c7c461 >> >> commit: a7ba988ff9de37f0961b4bf96d17aca73d0d2e25 [7012/7430] mm, slub: change run-time assertion in kmalloc_index() to compile-time >> >> config: parisc-randconfig-r014-20210604 (attached as .config) >> >> compiler: hppa-linux-gcc (GCC) 9.3.0 >> >> reproduce (this is a W=1 build): >> >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >> >> chmod +x ~/bin/make.cross >> >> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a7ba988ff9de37f0961b4bf96d17aca73d0d2e25 >> >> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >> >> git fetch --no-tags linux-next master >> >> git checkout a7ba988ff9de37f0961b4bf96d17aca73d0d2e25 >> >> # save the attached .config to linux build tree >> >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc >> >> >> >> If you fix the issue, kindly add following tag as appropriate >> >> Reported-by: kernel test robot >> >> >> >> All errors (new ones prefixed by >>): >> >> In file included from : >> >> In function 'kmalloc_index', >> >> inlined from 'kmalloc_node' at include/linux/slab.h:572:20, >> >> inlined from 'bpf_map_kmalloc_node.isra.0.part.0' at include/linux/bpf.h:1319:9: >> >> >> include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_183' declared with attribute error: unexpected size in kmalloc_index() >> >> 328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) >> >> | ^ >> >> include/linux/compiler_types.h:309:4: note: in definition of macro '__compiletime_assert' >> >> 309 | prefix ## suffix(); \ >> >> | ^~~~~~ >> >> include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert' >> >> 328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) >> >> | ^~~~~~~~~~~~~~~~~~~ >> >> include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' >> >> 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) >> >> | ^~~~~~~~~~~~~~~~~~ >> >> include/linux/slab.h:389:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' >> >> 389 | BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()"); >> >> | ^~~~~~~~~~~~~~~~ >> > >> > Reproduce with attached config, and read the code. >> > It has no problem in clang (clang-10/clang-11). it is problem with gcc. >> >> But what exactly is the gcc problem here? >> Did you have to reproduce it with specific gcc version and/or architecture? >> > > Before replying, I should say that I'm not an expert on gcc. > I just tried some ways to fix the error, and it seemed to me that > gcc is doing something wrong. I'm involving my gcc colleagues, will report results...