Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1681079rwd; Thu, 15 Jun 2023 14:09:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ41q8QV7LY87X8IZ4WQ7bomYUeAhfZvT27ePJZFKvbZo+lY1hZmhSxKhfROco2mR8uOmlJQ X-Received: by 2002:a05:6e02:108:b0:340:8f2b:ad53 with SMTP id t8-20020a056e02010800b003408f2bad53mr552417ilm.18.1686863390695; Thu, 15 Jun 2023 14:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686863390; cv=none; d=google.com; s=arc-20160816; b=eX63w7uwUm6pbDYg1ayDlCdKUZXjHknMGeuNENhWoqXoBoCugU65Z6JR99ABQQ++f3 ha+MTzt0JOE9nZtnXMrYi4J9ASrekJvx84jLGv/lznbhXN4W4LiQqpeLMKRFrN4kZjvS 92OXpPwUu1HxNtQ+J5S4A0+g6bDbDnweYTup5PJ9VjMjGsidhwlSrKvIlkI4J+9NZJZh x2DbNpifdr2SpM3sYiKqpaQZ8ct7Id2TnK1XxiuUmRE34t2zVle0r5RC0t0v9AcOPbUm QGNl2jgta4lvSR/MjygMvB7CqUKXa+P6lbnDAW+XkmqwiraXg0TEyyz4JVsSXF7s1ocv aXPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=dVvK/Na1gzfD54zw3ZOXcU4ToR+ZUGcJvnZfZy+0SyA=; b=CgDKsNqtKr3CJ/AcRpgvfYnlMTjK43hbrELVSiHTjSvqLJnsk4XmdJySd2zDe3gX2k OfQ7vIKGgCNSvxQE22pjRjCYS9Ml5qsGuJDx16HAJf2tRweYl5Fub4DOvi5J7+ZqKFGu K9CloBxyTPaiyG4GHErpnPHEkp3AlX45/qLZCA/cLXyNc8QrqqnLWOErGRCEmpTu6090 DqqoBhAATIV86Ul1U3dlIfvO8PBK2DiXaQ4vNlfoUuuNfoaEK6wxH9dzLGTaTTMOFTwJ kjuub+1lBCD6p75nfYAGH4iJEjOdb8pzhZpwLVdsutpRbrSJFjp5xOdNdatFwJLgHM2r zp4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="BYzNhG/2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a63ad02000000b0054fb1d593bdsi6262926pgf.749.2023.06.15.14.09.35; Thu, 15 Jun 2023 14:09:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="BYzNhG/2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232445AbjFOUsh (ORCPT + 99 others); Thu, 15 Jun 2023 16:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjFOUsg (ORCPT ); Thu, 15 Jun 2023 16:48:36 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0F4A123 for ; Thu, 15 Jun 2023 13:48:35 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-75d46c7cd6cso2972485a.3 for ; Thu, 15 Jun 2023 13:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686862115; x=1689454115; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dVvK/Na1gzfD54zw3ZOXcU4ToR+ZUGcJvnZfZy+0SyA=; b=BYzNhG/2M13rrWc4SlMkHjcj84wfdb67wim4N9PJyVRKPtgNfq6FLAzFHAakbir6aG vo9e+j+8nnoh810rC5R9QTR1iPW9VJ/pxU3naoK2dHb29sSA6MTb84Ku1VCGIRA7XGW5 IrejTrsPbwn89itbgLme/C+yC5XwFjrUMv/jqzN/F0FAw3X+eQ0MDy333M6EGEQSBcU1 pA0tSk9xbOJIHFh1FDJ7XtCfVrupBx4LzSl3gqX2BNSLNe6spb6aSUQAkGL340PnuI9U 8rv27Cz60Xxlx7i8w28IQHJtYIwZzWhaiVDCn08Jihq9TmgFabzkBi0LSJD0tWeDT5vd ucww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686862115; x=1689454115; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dVvK/Na1gzfD54zw3ZOXcU4ToR+ZUGcJvnZfZy+0SyA=; b=BHXSvDZAIKAOzCaVCZS3ss/cKo3CAzCDo5M/OrUusPwQCFCt1BWk1McZT5Xo9SlboJ XoPTGK4NF4bF/9h7OcNNwFa9XLEbEsCUmVLshq+4O3fbdF1AKO7KaUx98CA3bJXRCpg0 lmkd7w1qq3hdVqXqLp9a3P9QxYWx5feMW7bjaiXmkCvAU7YPzO9jdfr0eW6tKnk3zypn +kf0lzN4GN2kLPoKcFsyggRswpvf2hE3q/YVZ4zBxB6KeK6ERGKxhiY4cSPZvOIABH8P 2A/jZnOofCBVePxsy9VNoMoB4jkQubUDE5pr83Urc6uJ6mKVY3QDhGloFQcAJ4B97C+D rgEw== X-Gm-Message-State: AC+VfDwwckhQZLMnYu/5fo0egF9556RhsDq4yquY77EF9sTPkGtD8AK5 MA9nAukXAyZYQTfiuGp10LXESNWFY2EWSsb/avSTpg== X-Received: by 2002:a05:6214:5298:b0:62d:f170:f6b3 with SMTP id kj24-20020a056214529800b0062df170f6b3mr108262qvb.19.1686862114692; Thu, 15 Jun 2023 13:48:34 -0700 (PDT) MIME-Version: 1.0 References: <202306151433.QKcn7ZNn-lkp@intel.com> In-Reply-To: From: Nick Desaulniers Date: Thu, 15 Jun 2023 16:48:22 -0400 Message-ID: Subject: Re: lib/test_bitmap.c:920:2: error: call to '__compiletime_assert_239' declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(res) To: Andy Shevchenko Cc: kernel test robot , Alexander Lobakin , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Yury Norov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 15, 2023 at 3:52=E2=80=AFPM Nick Desaulniers wrote: > > On Thu, Jun 15, 2023 at 7:22=E2=80=AFAM Andy Shevchenko > wrote: > > > > On Thu, Jun 15, 2023 at 02:32:02PM +0800, kernel test robot wrote: > > > Hi Alexander, > > > > > > FYI, the error/warning still remains. > > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linu= x.git master > > > head: b6dad5178ceaf23f369c3711062ce1f2afc33644 > > > commit: dc34d5036692c614eef23c1130ee42a201c316bf lib: test_bitmap: ad= d compile-time optimization/evaluations assertions > > > date: 12 months ago > > > config: arm64-randconfig-r025-20230615 (https://download.01.org/0day-= ci/archive/20230615/202306151433.QKcn7ZNn-lkp@intel.com/config) > > ^ randconfig > > > > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.= git ae42196bc493ffe877a7e3dff8be32035dea4d07) > > > reproduce (this is a W=3D1 build): > > > mkdir -p ~/bin > > > wget https://raw.githubusercontent.com/intel/lkp-tests/master= /sbin/make.cross -O ~/bin/make.cross > > > chmod +x ~/bin/make.cross > > > # install arm64 cross compiling tool for clang build > > > # apt-get install binutils-aarch64-linux-gnu > > > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/li= nux.git/commit/?id=3Ddc34d5036692c614eef23c1130ee42a201c316bf > > > git remote add linus https://git.kernel.org/pub/scm/linux/ker= nel/git/torvalds/linux.git > > > git fetch --no-tags linus master > > > git checkout dc34d5036692c614eef23c1130ee42a201c316bf > > > # save the config file > > > mkdir build_dir && cp config build_dir/.config > > > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang ~/bin/mak= e.cross W=3D1 O=3Dbuild_dir ARCH=3Darm64 olddefconfig > > > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang ~/bin/mak= e.cross W=3D1 O=3Dbuild_dir ARCH=3Darm64 SHELL=3D/bin/bash lib/ > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a new = version of > > > the same patch/commit), kindly add following tags > > > | Reported-by: kernel test robot > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202306151433.QKcn7ZNn= -lkp@intel.com/ > > > > > > All errors (new ones prefixed by >>): > > > > > 888 /* > > > 889 * Equals to `unsigned long bitmap[1] =3D { GEN= MASK(6, 5), }`. > > > 890 * Clang on s390 optimizes bitops at compile-ti= me as intended, but at > > > 891 * the same time stops treating @bitmap and @bi= topvar as compile-time > > > 892 * constants after regular test_bit() is execut= ed, thus triggering the > > > 893 * build bugs below. So, call const_test_bit() = there directly until > > > 894 * the compiler is fixed. > > > 895 */ > > > 896 bitmap_clear(bitmap, 0, BITS_PER_LONG); > > > 897 #if defined(__s390__) && defined(__clang__) > > > 898 if (!const_test_bit(7, bitmap)) > > > 899 #else > > > 900 if (!test_bit(7, bitmap)) > > > 901 #endif > > > > Hmm... Reveals the bug in clang/arm64? > > Seems related to the config. ARCH=3Darm64 defconfig + > CONFIG_TEST_BITMAP=3Dy doesn't trigger this for me, but the randconfig > does. We'll bisect the config, and update the thread tracking this: > https://github.com/ClangBuiltLinux/linux/issues/1874 KASAN and GCOV together seem to be tickling this. > > > > > > 919 res =3D !test_bit(18, &bitopvar); > > > > 920 BUILD_BUG_ON(!__builtin_constant_p(res)); > > > 921 BUILD_BUG_ON(!res); > > > > > > -- > > With Best Regards, > > Andy Shevchenko > > > > > > > > > -- > Thanks, > ~Nick Desaulniers --=20 Thanks, ~Nick Desaulniers