Greeting,
FYI, we noticed the following commit (built with clang-15):
commit: 99f251040f9933fcdb4d9a6bf9af130a53fb5556 ("[PATCH] fs/proc: Optimize arrays
defined by struct ctl_path")
url:
https://github.com/0day-ci/linux/commits/Meng-Tang/fs-proc-Optimize-array...
base:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
5c1ee569660d4a205dced9cb4d0306b907fb7599
patch link:
https://lore.kernel.org/linux-csky/20220223094837.20337-1-tangmeng@uniont...
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang(a)intel.com>
[ 63.585952][ T1] BUG: KASAN: global-out-of-bounds in __register_sysctl_paths (??:?)
[ 63.585952][ T1] Read of size 8 at addr ffffffff851eaab0 by task swapper/0/1
[ 63.585952][ T1]
[ 63.585952][ T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted
5.17.0-rc5-00012-g99f251040f99 #1 d6725855da240bf400bb169b9fd6300ffdd774d1
[ 63.585952][ T1] Call Trace:
[ 63.585952][ T1] <TASK>
[ 63.585952][ T1] dump_stack_lvl (??:?)
[ 63.585952][ T1] print_address_description (report.c:?)
[ 63.585952][ T1] ? __register_sysctl_paths (??:?)
[ 63.585952][ T1] __kasan_report (report.c:?)
[ 63.585952][ T1] ? __register_sysctl_paths (??:?)
[ 63.585952][ T1] kasan_report (??:?)
[ 63.585952][ T1] __asan_report_load8_noabort (??:?)
[ 63.585952][ T1] __register_sysctl_paths (??:?)
[ 63.585952][ T1] register_sysctl_paths (??:?)
[ 63.585952][ T1] ? hardlockup_detector_perf_init (seccomp.c:?)
[ 63.585952][ T1] seccomp_sysctl_init (seccomp.c:?)
[ 63.585952][ T1] do_one_initcall (??:?)
[ 63.585952][ T1] do_initcall_level (main.c:?)
[ 63.585952][ T1] do_initcalls (main.c:?)
[ 63.585952][ T1] do_basic_setup (main.c:?)
[ 63.585952][ T1] kernel_init_freeable (main.c:?)
[ 63.585952][ T1] ? rest_init (main.c:?)
[ 63.585952][ T1] kernel_init (main.c:?)
[ 63.585952][ T1] ? rest_init (main.c:?)
[ 63.585952][ T1] ret_from_fork (??:?)
[ 63.585952][ T1] </TASK>
[ 63.585952][ T1]
[ 63.585952][ T1] The buggy address belongs to the variable:
[ 63.585952][ T1] seccomp_sysctl_path+0x10/0x20
[ 63.585952][ T1]
[ 63.585952][ T1] Memory state around the buggy address:
[ 63.585952][ T1] ffffffff851ea980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 63.585952][ T1] ffffffff851eaa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 63.585952][ T1] >ffffffff851eaa80: 04 f9 f9 f9 00 00 f9 f9 00 00 00 00 00 00 00
00
[ 63.585952][ T1] ^
[ 63.585952][ T1] ffffffff851eab00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 63.585952][ T1] ffffffff851eab80: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
[ 63.585952][ T1] ==================================================================
[ 63.585952][ T1] Disabling lock debugging due to kernel taint
[ 63.619393][ T1] Initialise system trusted keyrings
[ 63.620021][ T1] _warn_unseeded_randomness: 6 callbacks suppressed
To reproduce:
# build kernel
cd linux
cp config-5.17.0-rc5-00012-g99f251040f99 .config
make HOSTCC=clang-15 CC=clang-15 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage
modules
make HOSTCC=clang-15 CC=clang-15 ARCH=x86_64 INSTALL_MOD_PATH=<mod-install-dir>
modules_install
cd <mod-install-dir>
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached
in this email
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/lkp@lists.01.org Intel Corporation
Thanks,
Oliver Sang