lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc4a1940-9932-4d96-aac6-4dd11169c4a3@intel.com>
Date: Mon, 17 Mar 2025 16:35:24 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Uros Bizjak <ubizjak@...il.com>
CC: kernel test robot <lkp@...el.com>, <llvm@...ts.linux.dev>,
	<oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
	<x86@...nel.org>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [tip:x86/asm 3/7] lib/test_bitmap.c:1269:2: error: call to
 '__compiletime_assert_279' declared with 'error' attribute: BUILD_BUG_ON
 failed: !__builtin_constant_p(res)

From: Uros Bizjak <ubizjak@...il.com>
Date: Sun, 16 Mar 2025 09:28:51 +0100

> On Sun, Mar 16, 2025 at 3:52 AM kernel test robot <lkp@...el.com> wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
>> head:   9628d19e91f1ef9e7b1321e74a88bfa646d2a8d3
>> commit: 01ba23bf1b3f9a4035faedc2aa450e251bcc2c7c [3/7] x86/hweight: Use ASM_CALL_CONSTRAINT in inline asm()
>> config: x86_64-buildonly-randconfig-003-20250316 (https://download.01.org/0day-ci/archive/20250316/202503161004.ZmMcxxeB-lkp@intel.com/config)
>> compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
>> rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250316/202503161004.ZmMcxxeB-lkp@intel.com/reproduce)
>>
>> 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 <lkp@...el.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202503161004.ZmMcxxeB-lkp@intel.com/
>>
>> All errors (new ones prefixed by >>):
>>
>>>> lib/test_bitmap.c:1269:2: error: call to '__compiletime_assert_279' declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(res)
>>     1269 |         BUILD_BUG_ON(!__builtin_constant_p(res));
> 
> I fail to see how the referred patch can cause an error in:
> 
> /* !(BIT(31) & BIT(18)) == 1 */
> res = !test_bit(18, &bitopvar);
> BUILD_BUG_ON(!__builtin_constant_p(res));
> BUILD_BUG_ON(!res);

Kbuild bot sometimes fails on randconfigs and random commits blaming
these commits even though they're unrelated.
Esp this function, I dunno why, but time to time on different arches
(um is the winner here) it fails to expand obvious stuff. This for sure
depends on debug stuff configuration, let's say in the attached config I
see KASAN enabled, but not always and it's unclear how to catch and
reproduce stuff (and then how to fix) reliably.

Re Clang and KASAN, there's this in lib/Makefile:

obj-$(CONFIG_TEST_BITMAP) += test_bitmap.o
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_KASAN),yy)
# FIXME: Clang breaks test_bitmap_const_eval when KASAN and GCOV are enabled
GCOV_PROFILE_test_bitmap.o := n
endif

This was added a while ago not by me as I'm no instrumentation expert
and have no idea about those GCOV_PROFILE etc. Does 19.1.7 want more
than that to evaluate obvious things?

> 
> Otherwise, the patch fixes a correctness issue, so there is nothing to
> do with the patch anyway.
> 
> Uros.

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ