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]
Date:   Wed, 5 Jan 2022 10:17:29 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Imran Khan <imran.f.khan@...cle.com>
Cc:     0day robot <lkp@...el.com>, LKML <linux-kernel@...r.kernel.org>,
        lkp@...ts.01.org, gregkh@...uxfoundation.org, tj@...nel.org
Subject: [kernfs]  3dd2a5f81a: INFO:trying_to_register_non-static_key



Greeting,

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

commit: 3dd2a5f81a41be1f22391cc8ef0ac78293de0141 ("[RFC PATCH v2 2/2] kernfs: Reduce contention around global per-fs kernfs_rwsem.")
url: https://github.com/0day-ci/linux/commits/Imran-Khan/kernfs-use-kernfs_node-specific-mutex-and-spinlock/20220103-164752
patch link: https://lore.kernel.org/lkml/20220103084544.1109829-3-imran.f.khan@oracle.com

in testcase: rcuscale
version: 
with following parameters:

	runtime: 300s
	scale_type: srcud



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


+-----------------------------------------------+------------+------------+
|                                               | 0fc4d2a7a9 | 3dd2a5f81a |
+-----------------------------------------------+------------+------------+
| INFO:trying_to_register_non-static_key        | 0          | 60         |
| WARNING:at_kernel/locking/rwsem.c:#down_write | 0          | 60         |
| EIP:down_write                                | 0          | 60         |
| WARNING:at_kernel/locking/rwsem.c:#up_write   | 0          | 60         |
| EIP:up_write                                  | 0          | 60         |
+-----------------------------------------------+------------+------------+


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


[    0.740605][    T0] INFO: trying to register non-static key.
[    0.741504][    T0] The code is fine but needs lockdep annotation, or maybe
[    0.742530][    T0] you didn't initialize this object before use?
[    0.743485][    T0] turning off the locking correctness validator.
[    0.743838][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.16.0-rc6-next-20211224-00002-g3dd2a5f81a41 #7
[    0.743838][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[    0.743838][    T0] Call Trace:
[ 0.743838][ T0] dump_stack_lvl (kbuild/src/rand-2/lib/dump_stack.c:108) 
[ 0.743838][ T0] dump_stack (kbuild/src/rand-2/lib/dump_stack.c:114) 
[ 0.743838][ T0] register_lock_class (kbuild/src/rand-2/kernel/locking/lockdep.c:952 kbuild/src/rand-2/kernel/locking/lockdep.c:1263) 
[ 0.743838][ T0] ? sched_clock_cpu (kbuild/src/rand-2/kernel/sched/clock.c:382) 
[ 0.743838][ T0] __lock_acquire (kbuild/src/rand-2/kernel/locking/lockdep.c:4907) 
[ 0.743838][ T0] lock_acquire (kbuild/src/rand-2/kernel/locking/lockdep.c:438 kbuild/src/rand-2/kernel/locking/lockdep.c:5641 kbuild/src/rand-2/kernel/locking/lockdep.c:5604) 
[ 0.743838][ T0] ? kernfs_add_one (kbuild/src/rand-2/fs/kernfs/dir.c:754) 
[ 0.743838][ T0] down_write (kbuild/src/rand-2/kernel/locking/rwsem.c:1278 kbuild/src/rand-2/kernel/locking/rwsem.c:1515) 
[ 0.743838][ T0] ? kernfs_add_one (kbuild/src/rand-2/fs/kernfs/dir.c:754) 
[ 0.743838][ T0] kernfs_add_one (kbuild/src/rand-2/fs/kernfs/dir.c:754) 
[ 0.743838][ T0] kernfs_create_dir_ns (kbuild/src/rand-2/fs/kernfs/dir.c:1009) 
[ 0.743838][ T0] sysfs_create_dir_ns (kbuild/src/rand-2/include/linux/err.h:36 kbuild/src/rand-2/fs/sysfs/dir.c:61) 
[ 0.743838][ T0] kobject_add_internal (kbuild/src/rand-2/lib/kobject.c:89 (discriminator 11) kbuild/src/rand-2/lib/kobject.c:255 (discriminator 11)) 
[ 0.743838][ T0] ? kfree_const (kbuild/src/rand-2/mm/util.c:41) 
[ 0.743838][ T0] ? kobject_set_name_vargs (kbuild/src/rand-2/lib/kobject.c:312) 
[ 0.743838][ T0] kobject_add (kbuild/src/rand-2/lib/kobject.c:390 kbuild/src/rand-2/lib/kobject.c:442) 
[ 0.743838][ T0] kobject_create_and_add (kbuild/src/rand-2/lib/kobject.c:815) 
[ 0.743838][ T0] mnt_init (kbuild/src/rand-2/fs/namespace.c:4373) 
[ 0.743838][ T0] vfs_caches_init (kbuild/src/rand-2/fs/dcache.c:3295) 
[ 0.743838][ T0] start_kernel (kbuild/src/rand-2/init/main.c:1123) 
[ 0.743838][ T0] ? early_idt_handler_common (kbuild/src/rand-2/arch/x86/kernel/head_32.S:417) 
[ 0.743838][ T0] i386_start_kernel (kbuild/src/rand-2/arch/x86/kernel/head32.c:57) 
[ 0.743838][ T0] startup_32_smp (kbuild/src/rand-2/arch/x86/kernel/head_32.S:328) 
[    0.743841][    T0] ------------[ cut here ]------------
[    0.747174][    T0] DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x0, magic = 0x0, owner = 0x0, curr 0xc24ce5c0, list not empty
[ 0.748936][ T0] WARNING: CPU: 0 PID: 0 at kernel/locking/rwsem.c:1278 down_write (kbuild/src/rand-2/kernel/locking/rwsem.c:1278 kbuild/src/rand-2/kernel/locking/rwsem.c:1515) 
[    0.750268][    T0] Modules linked in:
[    0.750508][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.16.0-rc6-next-20211224-00002-g3dd2a5f81a41 #7
[    0.751888][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 0.753284][ T0] EIP: down_write (kbuild/src/rand-2/kernel/locking/rwsem.c:1278 kbuild/src/rand-2/kernel/locking/rwsem.c:1515) 
[ 0.753841][ T0] Code: 8b 46 3c 8b 1d e4 26 4e c2 c7 04 24 c8 74 33 c2 89 54 24 08 ba 73 74 33 c2 89 5c 24 14 89 44 24 0c 89 54 24 04 e8 55 e1 f5 ff <0f> 0b 31 c9 ba 01 00 00 00 c7 04 24 01 00 00 00 b8 e8 19 ae c2 e8
All code
========
   0:	8b 46 3c             	mov    0x3c(%rsi),%eax
   3:	8b 1d e4 26 4e c2    	mov    -0x3db1d91c(%rip),%ebx        # 0xffffffffc24e26ed
   9:	c7 04 24 c8 74 33 c2 	movl   $0xc23374c8,(%rsp)
  10:	89 54 24 08          	mov    %edx,0x8(%rsp)
  14:	ba 73 74 33 c2       	mov    $0xc2337473,%edx
  19:	89 5c 24 14          	mov    %ebx,0x14(%rsp)
  1d:	89 44 24 0c          	mov    %eax,0xc(%rsp)
  21:	89 54 24 04          	mov    %edx,0x4(%rsp)
  25:	e8 55 e1 f5 ff       	callq  0xfffffffffff5e17f
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	31 c9                	xor    %ecx,%ecx
  2e:	ba 01 00 00 00       	mov    $0x1,%edx
  33:	c7 04 24 01 00 00 00 	movl   $0x1,(%rsp)
  3a:	b8 e8 19 ae c2       	mov    $0xc2ae19e8,%eax
  3f:	e8                   	.byte 0xe8

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	31 c9                	xor    %ecx,%ecx
   4:	ba 01 00 00 00       	mov    $0x1,%edx
   9:	c7 04 24 01 00 00 00 	movl   $0x1,(%rsp)
  10:	b8 e8 19 ae c2       	mov    $0xc2ae19e8,%eax
  15:	e8                   	.byte 0xe8
[    0.757174][    T0] EAX: 0000006f EBX: c24ce5c0 ECX: 00000000 EDX: 00000000
[    0.758206][    T0] ESI: c40110f4 EDI: c4011134 EBP: c24bde4c ESP: c24bde24
[    0.759202][    T0] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00210282
[    0.760303][    T0] CR0: 80050033 CR2: ffdd9000 CR3: 02c6f000 CR4: 00040690
[    0.760509][    T0] Call Trace:
[ 0.761040][ T0] kernfs_add_one (kbuild/src/rand-2/fs/kernfs/dir.c:754) 
[ 0.761714][ T0] kernfs_create_dir_ns (kbuild/src/rand-2/fs/kernfs/dir.c:1009) 
[ 0.762449][ T0] sysfs_create_dir_ns (kbuild/src/rand-2/include/linux/err.h:36 kbuild/src/rand-2/fs/sysfs/dir.c:61) 
[ 0.763842][ T0] kobject_add_internal (kbuild/src/rand-2/lib/kobject.c:89 (discriminator 11) kbuild/src/rand-2/lib/kobject.c:255 (discriminator 11)) 
[ 0.764643][ T0] ? kfree_const (kbuild/src/rand-2/mm/util.c:41) 
[ 0.765371][ T0] ? kobject_set_name_vargs (kbuild/src/rand-2/lib/kobject.c:312) 
[ 0.766137][ T0] kobject_add (kbuild/src/rand-2/lib/kobject.c:390 kbuild/src/rand-2/lib/kobject.c:442) 
[ 0.766769][ T0] kobject_create_and_add (kbuild/src/rand-2/lib/kobject.c:815) 
[ 0.767175][ T0] mnt_init (kbuild/src/rand-2/fs/namespace.c:4373) 
[ 0.767784][ T0] vfs_caches_init (kbuild/src/rand-2/fs/dcache.c:3295) 
[ 0.768572][ T0] start_kernel (kbuild/src/rand-2/init/main.c:1123) 
[ 0.769246][ T0] ? early_idt_handler_common (kbuild/src/rand-2/arch/x86/kernel/head_32.S:417) 
[ 0.770508][ T0] i386_start_kernel (kbuild/src/rand-2/arch/x86/kernel/head32.c:57) 
[ 0.771192][ T0] startup_32_smp (kbuild/src/rand-2/arch/x86/kernel/head_32.S:328) 
[    0.771873][    T0] irq event stamp: 1153
[ 0.772517][ T0] hardirqs last enabled at (1153): _raw_spin_unlock_irqrestore (kbuild/src/rand-2/arch/x86/include/asm/irqflags.h:45 kbuild/src/rand-2/arch/x86/include/asm/irqflags.h:80 kbuild/src/rand-2/arch/x86/include/asm/irqflags.h:138 kbuild/src/rand-2/include/linux/spinlock_api_smp.h:151 kbuild/src/rand-2/kernel/locking/spinlock.c:194) 
[ 0.773841][ T0] hardirqs last disabled at (1152): _raw_spin_lock_irqsave (kbuild/src/rand-2/include/linux/spinlock_api_smp.h:108 kbuild/src/rand-2/kernel/locking/spinlock.c:162) 
[ 0.775115][ T0] softirqs last enabled at (0): 0x0 
[ 0.776015][ T0] softirqs last disabled at (0): 0x0 
[    0.777174][    T0] ---[ end trace 0000000000000000 ]---
[    0.777917][    T0] ------------[ cut here ]------------
[    0.778654][    T0] DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x1, magic = 0x0, owner = 0xc24ce5c0, curr 0xc24ce5c0, list not empty


To reproduce:

        # build kernel
	cd linux
	cp config-5.16.0-rc6-next-20211224-00002-g3dd2a5f81a41 .config
	make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 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


View attachment "config-5.16.0-rc6-next-20211224-00002-g3dd2a5f81a41" of type "text/plain" (144051 bytes)

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

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

View attachment "rcuscale" of type "text/plain" (6853 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ