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>] [day] [month] [year] [list]
Message-ID: <202312020406.V5RUTSeC-lkp@intel.com>
Date:   Sat, 2 Dec 2023 05:00:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Kees Cook <keescook@...omium.org>
Subject: lib/overflow_kunit.c:728:38: sparse: sparse: undefined preprocessor
 identifier '__clang_major__'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   994d5c58e50e91bb02c7be4a91d5186292a895c8
commit: 0e5b9f25b27a7a92880f88f5dba3edf726ec5f61 overflow: disable failing tests for older clang versions
date:   1 year, 1 month ago
config: hexagon-randconfig-r121-20231119 (https://download.01.org/0day-ci/archive/20231202/202312020406.V5RUTSeC-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20231202/202312020406.V5RUTSeC-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/202312020406.V5RUTSeC-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/overflow_kunit.c:728:38: sparse: sparse: undefined preprocessor identifier '__clang_major__'
   lib/overflow_kunit.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
   include/linux/page-flags.h:248:46: sparse: sparse: self-comparison always evaluates to false
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:270:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:271:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:272:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:273:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:274:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:275:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:286:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:292:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:299:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true
   lib/overflow_kunit.c:306:1: sparse: sparse: self-comparison always evaluates to true

vim +/__clang_major__ +728 lib/overflow_kunit.c

   711	
   712	static struct kunit_case overflow_test_cases[] = {
   713		KUNIT_CASE(u8_u8__u8_overflow_test),
   714		KUNIT_CASE(s8_s8__s8_overflow_test),
   715		KUNIT_CASE(u16_u16__u16_overflow_test),
   716		KUNIT_CASE(s16_s16__s16_overflow_test),
   717		KUNIT_CASE(u32_u32__u32_overflow_test),
   718		KUNIT_CASE(s32_s32__s32_overflow_test),
   719	/* Clang 13 and earlier generate unwanted libcalls on 32-bit. */
   720	#if BITS_PER_LONG == 64
   721		KUNIT_CASE(u64_u64__u64_overflow_test),
   722		KUNIT_CASE(s64_s64__s64_overflow_test),
   723	#endif
   724	/*
   725	 * Clang 11 and earlier generate unwanted libcalls for signed output, unsigned
   726	 * input.
   727	 */
 > 728	#if !(defined(CONFIG_CC_IS_CLANG) && __clang_major__ <= 11)
   729		KUNIT_CASE(u32_u32__int_overflow_test),
   730	#endif
   731		KUNIT_CASE(u32_u32__u8_overflow_test),
   732		KUNIT_CASE(u8_u8__int_overflow_test),
   733		KUNIT_CASE(int_int__u8_overflow_test),
   734		KUNIT_CASE(shift_sane_test),
   735		KUNIT_CASE(shift_overflow_test),
   736		KUNIT_CASE(shift_truncate_test),
   737		KUNIT_CASE(shift_nonsense_test),
   738		KUNIT_CASE(overflow_allocation_test),
   739		KUNIT_CASE(overflow_size_helpers_test),
   740		{}
   741	};
   742	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ