[linus:master] [fortify] 4ce615e798: kunit.fortify.alloc_size_kmalloc_dynamic_test.fail

From: kernel test robot
Date: Sat Mar 30 2024 - 23:08:03 EST




Hello,

kernel test robot noticed "kunit.fortify.alloc_size_kmalloc_dynamic_test.fail" on:

commit: 4ce615e798a752d4431fcc52960478906dec2f0e ("fortify: Provide KUnit counters for failure testing")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

[test failed on linus/master 928a87efa42302a23bb9554be081a28058495f22]

in testcase: kunit
version:
with following parameters:

group: group-00



compiler: gcc-12
test machine: 16 threads 1 sockets Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz (Broadwell-DE) with 48G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)



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 <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202403311042.8c622906-oliver.sang@xxxxxxxxx



[ 332.725985] KTAP version 1
[ 332.730282] 1..1
[ 332.733973] KTAP version 1
[ 332.738613] # Subtest: fortify
[ 332.743557] # module: fortify_kunit
[ 332.743609] 1..10
[ 332.753298] ok 1 known_sizes_test
[ 332.753591] ok 2 control_flow_split_test
[ 332.760829] ok 3 alloc_size_kmalloc_const_test
[ 332.767135] # alloc_size_kmalloc_dynamic_test: EXPECTATION FAILED at lib/fortify_kunit.c:248
Expected __builtin_dynamic_object_size(p, 1) == expected, but
__builtin_dynamic_object_size(p, 1) == -1 (0xffffffffffffffff)
expected == 11 (0xb)
__alloc_size() not working with __bdos on kmemdup("hello there", len, gfp)
[ 332.817141] not ok 4 alloc_size_kmalloc_dynamic_test



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240331/202403311042.8c622906-oliver.sang@xxxxxxxxx



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