Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, llvm@lists.linux.dev
Subject: Re: [PATCH 3/3] ubsan/overflow: Enable ignorelist parsing and add type filter
Date: Tue, 18 Mar 2025 08:51:44 +0800	[thread overview]
Message-ID: <202503180815.hABxOEAV-lkp@intel.com> (raw)

In-Reply-To: <20250307041914.937329-3-kees@kernel.org>
References: <20250307041914.937329-3-kees@kernel.org>
TO: Kees Cook <kees@kernel.org>

Hi Kees,

kernel test robot noticed the following build errors:

[auto build test ERROR on kees/for-next/hardening]
[also build test ERROR on masahiroy-kbuild/for-next masahiroy-kbuild/fixes kees/for-next/pstore linus/master v6.14-rc7]
[cannot apply to kees/for-next/kspp next-20250317]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Kees-Cook/ubsan-overflow-Rework-integer-overflow-sanitizer-option-to-turn-on-everything/20250307-122130
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
patch link:    https://lore.kernel.org/r/20250307041914.937329-3-kees%40kernel.org
patch subject: [PATCH 3/3] ubsan/overflow: Enable ignorelist parsing and add type filter
config: x86_64-randconfig-074-20250318 (https://download.01.org/0day-ci/archive/20250318/202503180815.hABxOEAV-lkp@intel.com/config)
compiler: clang version 20.1.0 (https://github.com/llvm/llvm-project 24a30daaa559829ad079f2ff7f73eb4e18095f88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250318/202503180815.hABxOEAV-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503180815.hABxOEAV-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from lib/fortify_kunit.c:43:
   In file included from include/kunit/device.h:16:
   In file included from include/kunit/test.h:22:
   In file included from include/linux/kref.h:16:
   In file included from include/linux/spinlock.h:59:
   In file included from include/linux/irqflags.h:18:
   In file included from arch/x86/include/asm/irqflags.h:80:
   In file included from arch/x86/include/asm/paravirt.h:21:
   In file included from include/linux/cpumask.h:12:
   In file included from include/linux/bitmap.h:13:
   In file included from include/linux/string.h:392:
>> include/linux/fortify-string.h:719:4: error: call to '__read_overflow' declared with 'error' attribute: detected read beyond size of object (1st parameter)
     719 |                         __read_overflow();
         |                         ^
   1 error generated.


vim +719 include/linux/fortify-string.h

a28a6e860c6cf2 Francis Laniel 2021-02-25  710  
92df138a8d663c Kees Cook      2022-02-08  711  __FORTIFY_INLINE __diagnose_as(__builtin_memcmp, 1, 2, 3)
281d0c962752fb Kees Cook      2022-02-08  712  int memcmp(const void * const POS0 p, const void * const POS0 q, __kernel_size_t size)
a28a6e860c6cf2 Francis Laniel 2021-02-25  713  {
21a2c74b0a2a78 Kees Cook      2023-04-07  714  	const size_t p_size = __struct_size(p);
21a2c74b0a2a78 Kees Cook      2023-04-07  715  	const size_t q_size = __struct_size(q);
a28a6e860c6cf2 Francis Laniel 2021-02-25  716  
a28a6e860c6cf2 Francis Laniel 2021-02-25  717  	if (__builtin_constant_p(size)) {
fa35198f39571b Kees Cook      2022-09-19  718  		if (__compiletime_lessthan(p_size, size))
a28a6e860c6cf2 Francis Laniel 2021-02-25 @719  			__read_overflow();
fa35198f39571b Kees Cook      2022-09-19  720  		if (__compiletime_lessthan(q_size, size))
a28a6e860c6cf2 Francis Laniel 2021-02-25  721  			__read_overflow2();
a28a6e860c6cf2 Francis Laniel 2021-02-25  722  	}
3d965b33e40d97 Kees Cook      2023-04-07  723  	if (p_size < size)
3d965b33e40d97 Kees Cook      2023-04-07  724  		fortify_panic(FORTIFY_FUNC_memcmp, FORTIFY_READ, p_size, size, INT_MIN);
3d965b33e40d97 Kees Cook      2023-04-07  725  	else if (q_size < size)
3d965b33e40d97 Kees Cook      2023-04-07  726  		fortify_panic(FORTIFY_FUNC_memcmp, FORTIFY_READ, q_size, size, INT_MIN);
a28a6e860c6cf2 Francis Laniel 2021-02-25  727  	return __underlying_memcmp(p, q, size);
a28a6e860c6cf2 Francis Laniel 2021-02-25  728  }
a28a6e860c6cf2 Francis Laniel 2021-02-25  729  

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

             reply	other threads:[~2025-03-18  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18  0:51 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-07  4:19 [PATCH 0/3] ubsan/overflow: Enable pattern exclusions Kees Cook
2025-03-07  4:19 ` [PATCH 3/3] ubsan/overflow: Enable ignorelist parsing and add type filter Kees Cook
2025-03-07 23:33   ` Justin Stitt
2025-03-07 23:39   ` Justin Stitt

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=202503180815.hABxOEAV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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