[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202305221451.b48d9b55-yujie.liu@intel.com>
Date: Mon, 22 May 2023 15:04:48 +0800
From: kernel test robot <yujie.liu@...el.com>
To: Yajun Deng <yajun.deng@...ux.dev>
CC: <oe-lkp@...ts.linux.dev>, <lkp@...el.com>,
<linux-doc@...r.kernel.org>, <linux-edac@...r.kernel.org>,
<bp@...en8.de>, <tony.luck@...el.com>, <james.morse@....com>,
<mchehab@...nel.org>, <rric@...nel.org>, <corbet@....net>,
<linux-kernel@...r.kernel.org>, Yajun Deng <yajun.deng@...ux.dev>
Subject: Re: [PATCH] EDAC: Expose node link in sysfs if CONFIG_NUMA
Hello,
kernel test robot noticed "BUG:KASAN:wild-memory-access_in_edac_create_sysfs_mci_device" on:
commit: 725ca92fab0b553466d32b1fecd4e8b4adb4ed03 ("[PATCH] EDAC: Expose node link in sysfs if CONFIG_NUMA")
url: https://github.com/intel-lab-lkp/linux/commits/Yajun-Deng/EDAC-Expose-node-link-in-sysfs-if-CONFIG_NUMA/20230516-160858
base: https://git.kernel.org/cgit/linux/kernel/git/ras/ras.git edac-for-next
patch subject: [PATCH] EDAC: Expose node link in sysfs if CONFIG_NUMA
patch link: https://lore.kernel.org/all/20230516080748.3155788-1-yajun.deng@linux.dev/
in testcase: kernel-selftests
version: kernel-selftests-x86_64-60acb023-1_20230329
with following parameters:
group: sgx
test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
compiler: gcc-11
test machine: 16 threads 1 sockets Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz (Coffee Lake) with 32G memory
(please refer to attached dmesg/kmsg for entire log/backtrace)
If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <yujie.liu@...el.com>
| Closes: https://lore.kernel.org/oe-lkp/202305221451.b48d9b55-yujie.liu@intel.com
[ 61.987277][ T311] BUG: KASAN: wild-memory-access in edac_create_sysfs_mci_device (arch/x86/include/asm/bitops.h:228 arch/x86/include/asm/bitops.h:240 include/asm-generic/bitops/instrumented-non-atomic.h:142 include/linux/nodemask.h:423 drivers/edac/edac_mc_sysfs.c:934 drivers/edac/edac_mc_sysfs.c:1019)
[ 61.987284][ T311] Read of size 8 at addr 1fffffff854eddd8 by task systemd-udevd/311
0m] Reached targ[ 61.987289][ T311] CPU: 9 PID: 311 Comm: systemd-udevd Not tainted 6.4.0-rc1-00003-g725ca92fab0b #1
[ 61.987295][ T311] Call Trace:
[ 61.987297][ T311] <TASK>
[ 61.987299][ T311] dump_stack_lvl (lib/dump_stack.c:108)
[ 61.987305][ T311] kasan_report (mm/kasan/report.c:574)
[ 61.987311][ T311] ? edac_create_sysfs_mci_device (arch/x86/include/asm/bitops.h:228 arch/x86/include/asm/bitops.h:240 include/asm-generic/bitops/instrumented-non-atomic.h:142 include/linux/nodemask.h:423 drivers/edac/edac_mc_sysfs.c:934 drivers/edac/edac_mc_sysfs.c:1019)
[ 61.987317][ T311] kasan_check_range (mm/kasan/generic.c:188)
[ 61.987320][ T311] edac_create_sysfs_mci_device (arch/x86/include/asm/bitops.h:228 arch/x86/include/asm/bitops.h:240 include/asm-generic/bitops/instrumented-non-atomic.h:142 include/linux/nodemask.h:423 drivers/edac/edac_mc_sysfs.c:934 drivers/edac/edac_mc_sysfs.c:1019)
[ 62.067405][ T311] edac_mc_add_mc_with_groups (drivers/edac/edac_mc.c:648)
[ 62.073291][ T311] ? _raw_spin_unlock_irqrestore (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:77 arch/x86/include/asm/irqflags.h:135 include/linux/spinlock_api_smp.h:151 kernel/locking/spinlock.c:194)
[ 62.079279][ T311] ie31200_probe1 (drivers/edac/ie31200_edac.c:528) ie31200_edac
1;39mRegular bac[ 62.093328][ T311] ? ie31200_check (drivers/edac/ie31200_edac.c:405) ie31200_edac
kground program [ 62.100696][ T311] ? do_pci_enable_device (drivers/pci/pci.c:1931 drivers/pci/pci.c:1907)
processing daemo[ 62.107379][ T311] ? rpm_callback (drivers/base/power/runtime.c:763)
[ 62.113329][ T311] ? spin_bug (kernel/locking/spinlock_debug.c:113)
[ 62.118112][ T311] ? pci_enable_device_flags (drivers/pci/pci.c:2007)
[ 62.123916][ T311] ? ie31200_probe1 (drivers/edac/ie31200_edac.c:549) ie31200_edac
[ 62.126911][ T321] calling mei_init+0x0/0xc0 [mei] @ 321
[ 62.130145][ T311] ie31200_init_one (drivers/edac/ie31200_edac.c:555) ie31200_edac
[ 62.130151][ T311] ? ie31200_probe1 (drivers/edac/ie31200_edac.c:549) ie31200_edac
[ 62.137671][ T321] initcall mei_init+0x0/0xc0 [mei] returned 0 after 2001 usecs
[ 62.141510][ T311] local_pci_probe (drivers/pci/pci-driver.c:324)
[ 62.141518][ T311] pci_call_probe (drivers/pci/pci-driver.c:392)
[ 62.166212][ T311] ? spin_bug (kernel/locking/spinlock_debug.c:113)
[ 62.166220][ T311] ? pci_pm_suspend_late (drivers/pci/pci-driver.c:352)
Startin[ 62.166225][ T311] ? pci_match_device (drivers/pci/pci-driver.c:159)
System Message [ 62.188729][ T311] ? kernfs_put (arch/x86/include/asm/atomic.h:123 (discriminator 1) include/linux/atomic/atomic-instrumented.h:576 (discriminator 1) fs/kernfs/dir.c:539 (discriminator 1))
[ 62.194359][ T311] pci_device_probe (drivers/pci/pci-driver.c:461)
[ 62.199890][ T311] really_probe (drivers/base/dd.c:579 drivers/base/dd.c:658)
[ 62.204551][ T311] ? ktime_get (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:77 arch/x86/include/asm/irqflags.h:135 include/linux/seqlock.h:104 kernel/time/timekeeping.c:846)
[ 62.209137][ T311] __driver_probe_device (drivers/base/dd.c:736 drivers/base/dd.c:798)
[ 62.214589][ T311] driver_probe_device (drivers/base/dd.c:830)
[ 62.219781][ T311] __driver_attach (drivers/base/dd.c:1217)
[ 62.224707][ T311] ? __device_attach_driver (drivers/base/dd.c:1157)
[ 62.230405][ T311] bus_for_each_dev (drivers/base/bus.c:367)
[ 62.235339][ T311] ? lockdep_init_map_type (kernel/locking/lockdep.c:4856)
[ 62.235346][ T311] ? bus_remove_file (drivers/base/bus.c:356)
[ 62.235351][ T311] ? bus_add_driver (drivers/base/bus.c:672)
Startin[ 62.235357][ T311] bus_add_driver (drivers/base/bus.c:674)
4 Metadata Check[ 62.235368][ T311] ie31200_init (drivers/edac/ie31200_edac.c:574) ie31200_edac
.
[ 62.235378][ T311] ? 0xffffffffa0538000
[ 62.235381][ T311] do_one_initcall (init/main.c:1246)
[ 62.235385][ T311] ? trace_event_raw_event_initcall_level (init/main.c:1237)
[ 62.235390][ T311] ? __kmem_cache_alloc_node (mm/slub.c:3453 mm/slub.c:3490)
[ 62.235394][ T311] ? do_init_module (include/linux/slab.h:559 kernel/module/main.c:2517)
[ 62.235398][ T311] ? kasan_unpoison (mm/kasan/shadow.c:160 mm/kasan/shadow.c:194)
[ 62.235402][ T311] do_init_module (kernel/module/main.c:2529)
[ 62.235406][ T311] load_module (kernel/module/main.c:2980)
[ 62.235409][ T311] ? ima_read_file (security/integrity/ima/ima_main.c:788)
[ 62.235415][ T311] ? post_relocation (kernel/module/main.c:2829)
[ 62.235419][ T311] ? __x64_sys_fspick (fs/kernel_read_file.c:38)
[ 62.235424][ T311] ? __do_sys_finit_module (kernel/module/main.c:3099)
[ 62.235427][ T311] __do_sys_finit_module (kernel/module/main.c:3099)
[ 62.235430][ T311] ? __ia32_sys_init_module (kernel/module/main.c:3061)
[ 62.235433][ T311] ? seccomp_notify_ioctl (kernel/seccomp.c:1193)
[ 62.235440][ T311] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
[ 62.235445][ T311] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
[ 62.235448][ T311] RIP: 0033:0x7f92a8c3f5a9
[ 62.235451][ T311] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 27 08 0d 00 f7 d8 64 89 01 48
All code
========
0: 08 89 e8 5b 5d c3 or %cl,-0x3ca2a418(%rcx)
6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
d: 00 00 00
10: 90 nop
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 ret
33: 48 8b 0d 27 08 0d 00 mov 0xd0827(%rip),%rcx # 0xd0861
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W
Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 ret
9: 48 8b 0d 27 08 0d 00 mov 0xd0827(%rip),%rcx # 0xd0837
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
[ 62.235453][ T311] RSP: 002b:00007fff2a61dc58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 62.235456][ T311] RAX: ffffffffffffffda RBX: 000055a843568f40 RCX: 00007f92a8c3f5a9
[ 62.235458][ T311] RDX: 0000000000000000 RSI: 00007f92a8dd2efd RDI: 0000000000000006
[ 62.235459][ T311] RBP: 00007f92a8dd2efd R08: 0000000000000000 R09: 000055a84353a4c0
[ 62.235461][ T311] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000020000
[ 62.235462][ T311] R13: 0000000000000000 R14: 000055a84357c480 R15: 000055a8417d0e50
[ 62.235466][ T311] </TASK>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
View attachment "config-6.4.0-rc1-00003-g725ca92fab0b" of type "text/plain" (162269 bytes)
View attachment "job-script" of type "text/plain" (6142 bytes)
Download attachment "dmesg.xz" of type "application/x-xz" (50524 bytes)
View attachment "kernel-selftests" of type "text/plain" (7417 bytes)
View attachment "job.yaml" of type "text/plain" (5322 bytes)
View attachment "reproduce" of type "text/plain" (241 bytes)
Powered by blists - more mailing lists