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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 12 Jan 2021 21:59:25 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     "Paul E. McKenney" <paulmck@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        lkp@...ts.01.org, lkp@...el.com
Subject: [torture]  6e9c2c547d:
 WARNING:at_kernel/sched/core.c:#__set_cpus_allowed_ptr


Greeting,

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

commit: 6e9c2c547d9b5182bf130102597f01d1fda28b1d ("torture: Break affinity of kthreads last running on outgoing CPU")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master


in testcase: rcutorture
version: 
with following parameters:

	runtime: 300s
	test: cpuhotplug
	torture_type: tasks

test-description: rcutorture is rcutorture kernel module load/unload test.
test-url: https://www.kernel.org/doc/Documentation/RCU/torture.txt


on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 8G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+--------------------------------------------------------+------------+------------+
|                                                        | 1afb95fee0 | 6e9c2c547d |
+--------------------------------------------------------+------------+------------+
| boot_failures                                          | 0          | 24         |
| WARNING:at_kernel/sched/core.c:#__set_cpus_allowed_ptr | 0          | 24         |
| EIP:__set_cpus_allowed_ptr                             | 0          | 24         |
| WARNING:possible_circular_locking_dependency_detected  | 0          | 24         |
+--------------------------------------------------------+------------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang@...el.com>


[   79.243453] WARNING: CPU: 0 PID: 552 at kernel/sched/core.c:2379 __set_cpus_allowed_ptr (kbuild/src/consumer/kernel/sched/core.c:2379) 
[   79.244313] Modules linked in: rcutorture torture
[   79.244768] CPU: 0 PID: 552 Comm: torture_shuffle Not tainted 5.11.0-rc1-00026-g6e9c2c547d9b #1
[   79.245581] EIP: __set_cpus_allowed_ptr (kbuild/src/consumer/kernel/sched/core.c:2379) 
[ 79.246063] Code: 1a 20 74 28 8b 45 e4 8b 15 60 96 d8 42 8b 00 21 c2 84 d2 74 17 8b 15 58 96 d8 42 21 d0 84 c0 75 0b 83 bb d0 02 00 00 01 74 02 <0f> 0b 8b 45 e0 8d 4d e8 89 da 89 7c 24 04 89 04 24 89 f0 e8 d8 f8
All code
========
   0:	1a 20                	sbb    (%rax),%ah
   2:	74 28                	je     0x2c
   4:	8b 45 e4             	mov    -0x1c(%rbp),%eax
   7:	8b 15 60 96 d8 42    	mov    0x42d89660(%rip),%edx        # 0x42d8966d
   d:	8b 00                	mov    (%rax),%eax
   f:	21 c2                	and    %eax,%edx
  11:	84 d2                	test   %dl,%dl
  13:	74 17                	je     0x2c
  15:	8b 15 58 96 d8 42    	mov    0x42d89658(%rip),%edx        # 0x42d89673
  1b:	21 d0                	and    %edx,%eax
  1d:	84 c0                	test   %al,%al
  1f:	75 0b                	jne    0x2c
  21:	83 bb d0 02 00 00 01 	cmpl   $0x1,0x2d0(%rbx)
  28:	74 02                	je     0x2c
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	8b 45 e0             	mov    -0x20(%rbp),%eax
  2f:	8d 4d e8             	lea    -0x18(%rbp),%ecx
  32:	89 da                	mov    %ebx,%edx
  34:	89 7c 24 04          	mov    %edi,0x4(%rsp)
  38:	89 04 24             	mov    %eax,(%rsp)
  3b:	89 f0                	mov    %esi,%eax
  3d:	e8                   	.byte 0xe8
  3e:	d8 f8                	fdivr  %st(0),%st

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	8b 45 e0             	mov    -0x20(%rbp),%eax
   5:	8d 4d e8             	lea    -0x18(%rbp),%ecx
   8:	89 da                	mov    %ebx,%edx
   a:	89 7c 24 04          	mov    %edi,0x4(%rsp)
   e:	89 04 24             	mov    %eax,(%rsp)
  11:	89 f0                	mov    %esi,%eax
  13:	e8                   	.byte 0xe8
  14:	d8 f8                	fdivr  %st(0),%st
[   79.247793] EAX: 00000000 EBX: be856180 ECX: 00000000 EDX: 00000001
[   79.248390] ESI: d9b934c0 EDI: 00000000 EBP: be84bf6c ESP: be84bf44
[   79.248983] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00010006
[   79.249623] CR0: 80050033 CR2: 00500cb8 CR3: 7fa80000 CR4: 000406b0
[   79.250254] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[   79.250844] DR6: fffe0ff0 DR7: 00000400
[   79.251210] Call Trace:
[   79.251455] set_cpus_allowed_ptr (kbuild/src/consumer/kernel/sched/core.c:2395) 
[   79.251858] torture_shuffle (kbuild/src/consumer/kernel/torture.c:557 kbuild/src/consumer/kernel/torture.c:572) torture
[   79.252316] kthread (kbuild/src/consumer/kernel/kthread.c:292) 
[   79.252634] ? torture_shutdown (kbuild/src/consumer/kernel/torture.c:568) torture
[   79.253120] ? kthread_create_worker_on_cpu (kbuild/src/consumer/kernel/kthread.c:245) 
[   79.253609] ret_from_fork (kbuild/src/consumer/arch/x86/entry/entry_32.S:856) 
[   79.253997] irq event stamp: 884
[   79.254310] hardirqs last enabled at (883): _raw_spin_unlock_irqrestore (kbuild/src/consumer/include/linux/spinlock_api_smp.h:160 kbuild/src/consumer/kernel/locking/spinlock.c:191) 
[   79.255131] hardirqs last disabled at (884): _raw_spin_lock_irqsave (kbuild/src/consumer/include/linux/spinlock_api_smp.h:108 kbuild/src/consumer/kernel/locking/spinlock.c:159) 
[   79.255907] softirqs last enabled at (44): __do_softirq (kbuild/src/consumer/arch/x86/include/asm/preempt.h:26 kbuild/src/consumer/kernel/softirq.c:371) 
[   79.256613] softirqs last disabled at (19): do_softirq_own_stack (kbuild/src/consumer/arch/x86/kernel/irq_32.c:59 kbuild/src/consumer/arch/x86/kernel/irq_32.c:148) 
[   79.257364] ---[ end trace ce7fa3e22353d187 ]---
[   79.257851]
[   79.257853] ======================================================


To reproduce:

        # build kernel
	cd linux
	cp config-5.11.0-rc1-00026-g6e9c2c547d9b .config
	make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 olddefconfig prepare modules_prepare bzImage

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email



Thanks,
Oliver Sang


View attachment "config-5.11.0-rc1-00026-g6e9c2c547d9b" of type "text/plain" (135891 bytes)

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

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

View attachment "rcutorture" of type "text/plain" (4081 bytes)

Powered by blists - more mailing lists