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=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=no 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 E8336C47082 for ; Mon, 7 Jun 2021 15:50:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 997EB61029 for ; Mon, 7 Jun 2021 15:50:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 997EB61029 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3713F6B006E; Mon, 7 Jun 2021 11:50:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2FAAA6B0072; Mon, 7 Jun 2021 11:50:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14D506B0073; Mon, 7 Jun 2021 11:50:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id D1E786B006E for ; Mon, 7 Jun 2021 11:50:04 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6D57EE0B3 for ; Mon, 7 Jun 2021 15:50:04 +0000 (UTC) X-FDA: 78227363928.19.BA72FF7 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by imf20.hostedemail.com (Postfix) with ESMTP id 28599551 for ; Mon, 7 Jun 2021 15:50:01 +0000 (UTC) Received: by mail-pj1-f42.google.com with SMTP id fy24-20020a17090b0218b029016c5a59021fso5696953pjb.0 for ; Mon, 07 Jun 2021 08:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6exYO3Ti6E1AAD20wSaxowoM2Ox3aKIPS7xp0o6C6z4=; b=TcuSrJYoTcReU17PABXo3jTZqEx1wIwCz/mIlVqt5mS143kuDkqvrLvifgeZL/a4TT 1i/7OKiJbaOjj+sfE1jrKtWDYAGDxNsTQXQy0KDa+iPOPBU2x5KPzl5dOOKM1LE8JYGw qY9hqwreRKI+L7ihJ5hzYgQRBq7Tb+2bff660EzXDzWbOqPHmgN6CH5ZX7dZtkX//j5z z/C13URk1qDLqL8U5D7+6eDRbl2zLHYKDIJh6aV2SUarSI0DEVapBqNhXpC7ynhrsu4j UxeVFiHzk/wXoyw/ajCWSxzU6fRQ58u6P7+3kcBCRFSXujjPa93iXv42FJWtEtFRTmbg JPXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6exYO3Ti6E1AAD20wSaxowoM2Ox3aKIPS7xp0o6C6z4=; b=mavlv9xfDfkAShYcowg7If5vzK1MwwKwBABwxqTwvyAnKcsnHlTumbWnnDSl4qLO59 ekIAsNj2aOCaqKTlKuziUHEog24+hT+VSxugG+j4qQYdvUfZWvQKbZUPPLpkNdcow8Zs g1l/jks0ap8bVp+MumrmhzjsNVDogtu0QCn4ny/hOFLuRXgvZ1ur7TBVgKmrGjGi1HXt EX2ULaL3/SU2DrVwoQuOXN0FoN3aOxKLyyjf5zbEA5Dbz4vf74KzgwMl27wXhlyzPIdD P52YmHcK+uXul429EEqwSPEO2xVEqa3Qojhb88/xxNd3TiyWrBaz4VG789L2wSXFFGOC zjxA== X-Gm-Message-State: AOAM531i/DrI0vsjgaxa2IVGDV9Y8RLutqlvNLWnZv17E8AH5bfaeojd MrzMPbGmMVO26mJZ4MRRWSw= X-Google-Smtp-Source: ABdhPJxAdm8drpk2P1fU9wRz0jldIJmtK8fkzbUHhcXjkIQYXL0BcJt4B3ZfYjxdhJPARJTrIGKtTg== X-Received: by 2002:a17:90a:2f81:: with SMTP id t1mr33706903pjd.122.1623081003181; Mon, 07 Jun 2021 08:50:03 -0700 (PDT) Received: from hyeyoo ([110.70.55.156]) by smtp.gmail.com with ESMTPSA id y5sm8743956pfo.25.2021.06.07.08.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 08:50:02 -0700 (PDT) Date: Tue, 8 Jun 2021 00:49:57 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton 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() Message-ID: <20210607154957.GB927582@hyeyoo> References: <202106051442.G1VJubTz-lkp@intel.com> <20210606110839.GA13828@hyeyoo> <20210607122550.GA752464@hyeyoo> <06af75da-ffe9-7070-1da8-bcb2cb7881d2@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06af75da-ffe9-7070-1da8-bcb2cb7881d2@suse.cz> Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TcuSrJYo; spf=pass (imf20.hostedemail.com: domain of 42hyeyoo@gmail.com designates 209.85.216.42 as permitted sender) smtp.mailfrom=42hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: ds3tijxt8p8y1tu3a5htg9qt5133sqdz X-Rspamd-Queue-Id: 28599551 X-Rspamd-Server: rspam06 X-HE-Tag: 1623081001-288812 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 Mon, Jun 07, 2021 at 05:27:27PM +0200, Vlastimil Babka wrote: > 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... Thank you so much! Hyeonggon