From: Yury Norov <yury.norov@gmail.com>
To: linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
Nick Desaulniers <ndesaulniers@google.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Alexander Lobakin <alexandr.lobakin@intel.com>,
Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Nathan Chancellor <nathan@kernel.org>, Tom Rix <trix@redhat.com>,
oe-kbuild-all@lists.linux.dev, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] lib/bitmap: workaround const_eval test build failure
Date: Tue, 18 Jul 2023 14:09:02 -0700 [thread overview]
Message-ID: <ZLb/bioBIHS6bjKc@yury-ThinkPad> (raw)
In-Reply-To: <20230717220435.57640-1-yury.norov@gmail.com>
On Mon, Jul 17, 2023 at 03:04:35PM -0700, Yury Norov wrote:
> When building with Clang, and when KASAN and GCOV_PROFILE_ALL are both
> enabled, the test fails to build [1]:
>
> >> lib/test_bitmap.c:920:2: error: call to '__compiletime_assert_239' declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(res)
> BUILD_BUG_ON(!__builtin_constant_p(res));
> ^
> include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
> BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> ^
> include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
> #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> ^
> include/linux/compiler_types.h:352:2: note: expanded from macro 'compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> include/linux/compiler_types.h:340:2: note: expanded from macro '_compiletime_assert'
> __compiletime_assert(condition, msg, prefix, suffix)
> ^
> include/linux/compiler_types.h:333:4: note: expanded from macro '__compiletime_assert'
> prefix ## suffix(); \
> ^
> <scratch space>:185:1: note: expanded from here
> __compiletime_assert_239
>
> Originally it was attributed to s390, which now looks seemingly wrong. The
> issue is not related to bitmap code itself, but it breaks build for a given
> configuration.
>
> Disabling the const_eval test under that config may potentially hide other
> bugs. Instead, workaround it by disabling GCOV for the test_bitmap unless
> the compiler will get fixed.
>
> [1] https://github.com/ClangBuiltLinux/linux/issues/1874
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202307171254.yFcH97ej-lkp@intel.com/
> Fixes: dc34d5036692 ("lib: test_bitmap: add compile-time optimization/evaluations assertions")
> Co-developed-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Yury Norov <yury.norov@gmail.com>
So, I pushed it in bitmap-for-next. If nothing wrong will appear in
~week, I'll send a pull request, so expect merging it in this cycle.
Thank you for the work!
Thanks,
Yury
prev parent reply other threads:[~2023-07-18 21:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 22:04 [PATCH v2] lib/bitmap: workaround const_eval test build failure Yury Norov
2023-07-17 22:17 ` Nick Desaulniers
2023-07-18 13:44 ` Alexander Lobakin
2023-07-18 21:09 ` Yury Norov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZLb/bioBIHS6bjKc@yury-ThinkPad \
--to=yury.norov@gmail.com \
--cc=alexandr.lobakin@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=maxim.kuvyrkov@linaro.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox