lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202209301907.d0dff9f4-yujie.liu@intel.com>
Date:   Fri, 30 Sep 2022 20:14:09 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Zucheng Zheng <zhengzucheng@...wei.com>
CC:     <lkp@...ts.01.org>, <lkp@...el.com>,
        Li Hua <hucool.lihua@...wei.com>,
        <linux-kernel@...r.kernel.org>, <mingo@...hat.com>,
        <peterz@...radead.org>, <juri.lelli@...hat.com>,
        <vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
        <rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
        <bristot@...hat.com>, <vschneid@...hat.com>, <frederic@...nel.org>
Subject: [sched/cputime] 131c995687: BUG:spinlock_trylock_failure_on_UP_on_CPU

Greeting,

FYI, we noticed the following commit (built with gcc-11):

commit: 131c99568796ed8af66d1a5fd7e61465d252aeca ("[PATCH -next] sched/cputime: Fix the time backward issue about /proc/stat")
url: https://github.com/intel-lab-lkp/linux/commits/Zucheng-Zheng/sched-cputime-Fix-the-time-backward-issue-about-proc-stat/20220928-113916
patch link: https://lore.kernel.org/lkml/20220928033402.181530-1-zhengzucheng@huawei.com

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):


[   53.618563][  T321] BUG: spinlock trylock failure on UP on CPU#0, cp/321
[   53.620281][  T321] CPU: 0 PID: 321 Comm: cp Tainted: G                T  6.0.0-rc7-next-20220927-00001-g131c99568796 #33
[   53.621323][  T321] Call Trace:
[   53.621647][  T321]  <TASK>
[ 53.621952][ T321] dump_stack_lvl (??:?) 
[ 53.622362][ T321] dump_stack (??:?) 
[ 53.622715][ T321] spin_bug (spinlock_debug.c:?) 
[ 53.623068][ T321] do_raw_spin_trylock (??:?) 
[ 53.623489][ T321] __raw_spin_lock_irqsave (spinlock.c:?) 
[ 53.623951][ T321] ? _raw_spin_lock_irqsave (??:?) 
[ 53.624440][ T321] _raw_spin_lock_irqsave (??:?) 
[ 53.624904][ T321] kcpustat_cpu_fetch (??:?) 
[ 53.625383][ T321] uptime_proc_show (uptime.c:?) 
[ 53.625833][ T321] ? lock_is_held (kvm_main.c:?) 
[ 53.626267][ T321] ? show_stat (uptime.c:?) 
[ 53.626648][ T321] ? rcu_read_lock_bh_held (??:?) 
[ 53.627079][ T321] ? kasan_save_alloc_info (??:?) 
[ 53.627540][ T321] ? ____kasan_kmalloc (common.c:?) 
[ 53.627956][ T321] ? kvmalloc_node (??:?) 
[ 53.628378][ T321] seq_read_iter (??:?) 
[ 53.628804][ T321] proc_reg_read_iter (inode.c:?) 
[ 53.629291][ T321] call_read_iter (read_write.c:?) 
[ 53.629725][ T321] vfs_read (??:?) 
[ 53.630125][ T321] ? kernel_read (??:?) 
[ 53.630537][ T321] ? __lock_release (lockdep.c:?) 
[ 53.630981][ T321] ? __kasan_check_read (??:?) 
[ 53.631479][ T321] ? __fdget_pos (??:?) 
[ 53.631901][ T321] ksys_read (??:?) 
[ 53.632308][ T321] ? vfs_write (??:?) 
[ 53.632721][ T321] __x64_sys_read (??:?) 
[ 53.633136][ T321] do_syscall_64 (??:?) 
[ 53.633558][ T321] entry_SYSCALL_64_after_hwframe (??:?) 
[   53.634127][  T321] RIP: 0033:0x7f3802b01e8e
[ 53.634512][ T321] Code: c0 e9 b6 fe ff ff 50 48 8d 3d 6e 18 0a 00 e8 89 e8 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28
All code
========
   0:	c0 e9 b6             	shr    $0xb6,%cl
   3:	fe                   	(bad)  
   4:	ff                   	(bad)  
   5:	ff 50 48             	callq  *0x48(%rax)
   8:	8d 3d 6e 18 0a 00    	lea    0xa186e(%rip),%edi        # 0xa187c
   e:	e8 89 e8 01 00       	callq  0x1e89c
  13:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
  1a:	00 00 
  1c:	64 8b 04 25 18 00 00 	mov    %fs:0x18,%eax
  23:	00 
  24:	85 c0                	test   %eax,%eax
  26:	75 14                	jne    0x3c
  28:	0f 05                	syscall 
  2a:*	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax		<-- trapping instruction
  30:	77 5a                	ja     0x8c
  32:	c3                   	retq   
  33:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
  3a:	00 00 
  3c:	48 83 ec 28          	sub    $0x28,%rsp

Code starting with the faulting instruction
===========================================
   0:	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax
   6:	77 5a                	ja     0x62
   8:	c3                   	retq   
   9:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
  10:	00 00 
  12:	48 83 ec 28          	sub    $0x28,%rsp
[   53.636139][  T321] RSP: 002b:00007ffe76036628 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[   53.636894][  T321] RAX: ffffffffffffffda RBX: 00007ffe76036c60 RCX: 00007f3802b01e8e
[   53.637635][  T321] RDX: 0000000000020000 RSI: 00007f3802763000 RDI: 0000000000000003
[   53.638389][  T321] RBP: 00007ffe76036ae0 R08: 0000000000000000 R09: 0000000000000000
[   53.639174][  T321] R10: fffffffffffff28d R11: 0000000000000246 R12: 0000000000000000
[   53.639905][  T321] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
[   53.640642][  T321]  </TASK>


If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <yujie.liu@...el.com>
| Link: https://lore.kernel.org/r/202209301907.d0dff9f4-yujie.liu@intel.com


To reproduce:

        # build kernel
	cd linux
	cp config-6.0.0-rc7-next-20220927-00001-g131c99568796 .config
	make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=gcc-11 CC=gcc-11 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.


-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config-6.0.0-rc7-next-20220927-00001-g131c99568796" of type "text/plain" (136403 bytes)

View attachment "job-script" of type "text/plain" (5305 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (30148 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ