mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [linus:master] [iov_iter]  f1982740f5: BUG:KCSAN:data-race_in_copy_to_iter/print_report
@ 2024-10-25  7:23 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-25  7:23 UTC (permalink / raw)
  To: David Howells
  Cc: oe-lkp, lkp, linux-kernel, Christian Brauner, Alexander Viro,
	Jens Axboe, Christoph Hellwig, Christian Brauner, Matthew Wilcox,
	Linus Torvalds, David Laight, oliver.sang



Hello,

kernel test robot noticed "BUG:KCSAN:data-race_in_copy_to_iter/print_report" on:

commit: f1982740f5e77090bde41a9b84e257d69ec46598 ("iov_iter: Convert iterate*() to inline funcs")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

[test failed on linus/master      c2ee9f594da826bea183ed14f2cc029c719bf4da]
[test failed on linux-next/master 7436324ebd147598f940dde1335b7979dbccc339]
[test failed on fix commit        a50026bdb867c8caf9d29e18f9fe9e1390312619]

in testcase: trinity
version: trinity-static-x86_64-x86_64-1c734c75-1_2020-01-06
with following parameters:

	runtime: 300s
	group: group-03
	nr_groups: 5



config: x86_64-randconfig-013-20230914
compiler: gcc-12
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

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


we noticed the issue (1) doesn't always happen, 8 times out of 18 runs as
below. and there are other various random KCSAN issues for both f1982740f5
and its parent. but for (1), seems quite clean on parent. FYI.

f1b4cb650b9a0eeb f1982740f5e77090bde41a9b84e
---------------- ---------------------------
       fail:runs  %reproduction    fail:runs
           |             |             |
           :18          17%           3:18    dmesg.BUG:KCSAN:data-race_in_copy_from_iter/print_report
           :18          44%           8:18    dmesg.BUG:KCSAN:data-race_in_copy_to_iter/print_report    <----(1)
          5:18         -28%            :18    dmesg.BUG:KCSAN:data-race_in_copyin/print_report
          1:18          -6%            :18    dmesg.BUG:KCSAN:data-race_in_copyout/print_report
          1:18          -6%            :18    dmesg.BUG:KCSAN:data-race_in_do_raw_write_unlock/print_report
          1:18           0%           1:18    dmesg.BUG:KCSAN:data-race_in_end_dir_add/print_report
          4:18          11%           6:18    dmesg.BUG:KCSAN:data-race_in_inode_update_timestamps/print_report
          4:18         -17%           1:18    dmesg.BUG:KCSAN:data-race_in_print_report/start_dir_add
         15:18           0%          15:18    dmesg.BUG:KCSAN:data-race_in_print_report/timekeeping_advance
          1:18           6%           2:18    dmesg.BUG:KCSAN:data-race_in_print_report/timespec64_equal


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@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202410251443.19c83c0a-oliver.sang@intel.com


[  130.227943][  T404] BUG: KCSAN: data-race in _copy_to_iter / print_report
[  130.229246][  T404]
[  130.229742][  T404] read to 0xffff88817ef9b000 of 4096 bytes by task 373 on cpu 1:
[ 130.231136][ T404] _copy_to_iter (arch/x86/include/asm/uaccess_64.h:107 arch/x86/include/asm/uaccess_64.h:107 arch/x86/include/asm/uaccess_64.h:133 lib/iov_iter.c:27 include/linux/iov_iter.h:51 include/linux/iov_iter.h:247 include/linux/iov_iter.h:271 lib/iov_iter.c:195) 
[ 130.231994][ T404] copy_page_to_iter (lib/iov_iter.c:379) 
[ 130.232961][ T404] process_vm_rw_single_vec+0x1b3/0x21f 
[ 130.234196][ T404] process_vm_rw_core+0x1b5/0x29a 
[ 130.235426][ T404] process_vm_rw (mm/process_vm_access.c:283) 
[ 130.236279][ T404] __x64_sys_process_vm_readv (mm/process_vm_access.c:291) 
[ 130.237362][ T404] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 130.238214][ T404] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) 
[  130.239264][  T404]
[  130.239689][  T404] write to 0xffff88817ef9b000 of 4096 bytes by task 404 on cpu 0:
[ 130.241242][ T404] print_report (kernel/kcsan/report.c:396) 
[ 130.242084][ T404] kcsan_report_known_origin (kernel/kcsan/report.c:504 kernel/kcsan/report.c:694) 
[ 130.243157][ T404] kcsan_setup_watchpoint (kernel/kcsan/core.c:678) 
[ 130.244094][ T404] __kcsan_check_access (kernel/kcsan/core.c:754 kernel/kcsan/core.c:958) 
[ 130.245182][ T404] _copy_from_iter (arch/x86/include/asm/uaccess_64.h:107 arch/x86/include/asm/uaccess_64.h:107 arch/x86/include/asm/uaccess_64.h:127 lib/iov_iter.c:57 include/linux/iov_iter.h:51 include/linux/iov_iter.h:247 lib/iov_iter.c:273) 
[ 130.246089][ T404] copy_page_from_iter (lib/iov_iter.c:439) 
[ 130.246997][ T404] process_vm_rw_single_vec+0x1ac/0x21f 
[ 130.248212][ T404] process_vm_rw_core+0x1b5/0x29a 
[ 130.249458][ T404] process_vm_rw (mm/process_vm_access.c:283) 
[ 130.250377][ T404] __x64_sys_process_vm_writev (mm/process_vm_access.c:298) 
[ 130.251449][ T404] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 130.252273][ T404] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) 
[  130.253467][  T404]
[  130.253888][  T404] Reported by Kernel Concurrency Sanitizer on:
[  130.254959][  T404] CPU: 0 PID: 404 Comm: trinity-c3 Not tainted 6.6.0-rc2-00007-gf1982740f5e7 #1 bb9ae1a50ddb3ba41c398efbc8f00fb454c7c863
[  130.257249][  T404] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[  130.259159][  T404] ==================================================================



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241025/202410251443.19c83c0a-oliver.sang@intel.com



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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-25  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-25  7:23 [linus:master] [iov_iter] f1982740f5: BUG:KCSAN:data-race_in_copy_to_iter/print_report kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®