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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jan 2022 10:55:24 +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, tj@...nel.org, gregkh@...uxfoundation.org
Subject: [kernfs]  8652224976: WARNING:at_kernel/locking/rwsem.c:#up_write



Greeting,

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

commit: 86522249760a6c44da99474289f00fb302a8c393 ("[PATCH v3 2/2] kernfs: Reduce contention around global per-fs kernfs_rwsem.")
url: https://github.com/0day-ci/linux/commits/Imran-Khan/kernfs-use-hashed-mutex-and-spinlock-in-place-of-global-ones/20220113-184429
patch link: https://lore.kernel.org/lkml/20220113104259.1584491-3-imran.f.khan@oracle.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):




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


[ 3.958358][ T0] WARNING: CPU: 0 PID: 0 at kernel/locking/rwsem.c:1309 up_write (kernel/locking/rwsem.c:1309 kernel/locking/rwsem.c:1567) 
[    3.959313][    T0] Modules linked in:
[    3.960313][    T0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.16.0-next-20220111-00002-g86522249760a #1
[    3.961315][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 3.962312][ T0] RIP: 0010:up_write (kernel/locking/rwsem.c:1309 kernel/locking/rwsem.c:1567) 
[ 3.963311][ T0] Code: 80 3c 02 00 0f 85 8b 01 00 00 ff 34 24 48 8b 55 00 4d 89 f9 4d 89 f0 48 c7 c6 20 79 0c 9d 48 c7 c7 60 79 0c 9d e8 70 89 5b 02 <0f> 0b 59 e9 ba fe ff ff 48 89 df e8 bc c6 63 00 e9 8c fd ff ff 4c
All code
========
   0:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   4:	0f 85 8b 01 00 00    	jne    0x195
   a:	ff 34 24             	pushq  (%rsp)
   d:	48 8b 55 00          	mov    0x0(%rbp),%rdx
  11:	4d 89 f9             	mov    %r15,%r9
  14:	4d 89 f0             	mov    %r14,%r8
  17:	48 c7 c6 20 79 0c 9d 	mov    $0xffffffff9d0c7920,%rsi
  1e:	48 c7 c7 60 79 0c 9d 	mov    $0xffffffff9d0c7960,%rdi
  25:	e8 70 89 5b 02       	callq  0x25b899a
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	59                   	pop    %rcx
  2d:	e9 ba fe ff ff       	jmpq   0xfffffffffffffeec
  32:	48 89 df             	mov    %rbx,%rdi
  35:	e8 bc c6 63 00       	callq  0x63c6f6
  3a:	e9 8c fd ff ff       	jmpq   0xfffffffffffffdcb
  3f:	4c                   	rex.WR

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	59                   	pop    %rcx
   3:	e9 ba fe ff ff       	jmpq   0xfffffffffffffec2
   8:	48 89 df             	mov    %rbx,%rdi
   b:	e8 bc c6 63 00       	callq  0x63c6cc
  10:	e9 8c fd ff ff       	jmpq   0xfffffffffffffda1
  15:	4c                   	rex.WR
[    3.965308][    T0] RSP: 0000:ffffffff9e007bb0 EFLAGS: 00010286
[    3.966309][    T0] RAX: 0000000000000000 RBX: ffffffff9efe76e8 RCX: 0000000000000000
[    3.967311][    T0] RDX: c0000000ffff7fff RSI: ffffffff9e0078d0 RDI: fffffbfff3c00f68
[    3.968311][    T0] RBP: ffffffffa0a80140 R08: 0000000000000000 R09: fffffbfff3c00f04
[    3.969308][    T0] R10: ffffffff9e00781f R11: fffffbfff3c00f03 R12: ffffffffa0a80148
[    3.970310][    T0] R13: ffffffffa0a801a8 R14: ffffffff9e038500 R15: ffffffff9e038500
[    3.971309][    T0] FS:  0000000000000000(0000) GS:ffff88839d200000(0000) knlGS:0000000000000000
[    3.972315][    T0] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.973313][    T0] CR2: ffff88843ffff000 CR3: 0000000111e2a000 CR4: 00000000000006b0
[    3.974314][    T0] Call Trace:
[    3.975314][    T0]  <TASK>
[ 3.976327][ T0] kernfs_add_one (fs/kernfs/dir.c:761) 
[ 3.977311][ T0] ? kernfs_get (fs/kernfs/dir.c:513) 
[ 3.978323][ T0] kernfs_create_dir_ns (fs/kernfs/dir.c:1008) 
[ 3.979317][ T0] sysfs_create_dir_ns (fs/sysfs/dir.c:61) 
[ 3.980314][ T0] ? kernfs_activate (fs/kernfs/dir.c:1316) 
[ 3.981314][ T0] ? sysfs_create_mount_point (fs/sysfs/dir.c:41) 
[ 3.982312][ T0] ? rcu_read_lock_sched_held (kernel/rcu/update.c:123) 
[ 3.983313][ T0] ? rcu_read_lock_bh_held (kernel/rcu/update.c:120) 
[ 3.984318][ T0] ? rcu_read_lock_held_common (kernel/rcu/update.c:104) 
[ 3.985336][ T0] ? rcu_read_lock_sched_held (kernel/rcu/update.c:123) 
[ 3.986323][ T0] kobject_add_internal (lib/kobject.c:89 lib/kobject.c:255) 
[ 3.987340][ T0] kobject_add (lib/kobject.c:390 lib/kobject.c:442) 
[ 3.988320][ T0] ? kobject_add_internal (lib/kobject.c:428) 
[ 3.989322][ T0] ? kasan_unpoison (mm/kasan/shadow.c:108 mm/kasan/shadow.c:142) 
[ 3.990310][ T0] ? __kasan_slab_alloc (mm/kasan/common.c:431 mm/kasan/common.c:469) 
[ 3.991327][ T0] kobject_create_and_add (lib/kobject.c:815) 
[ 3.992314][ T0] mnt_init (fs/namespace.c:4372) 
[ 3.993319][ T0] ? init_fs_namespace_sysctls (fs/namespace.c:4346) 
[ 3.994309][ T0] ? _raw_spin_unlock_irqrestore (arch/x86/include/asm/irqflags.h:45 arch/x86/include/asm/irqflags.h:80 arch/x86/include/asm/irqflags.h:138 include/linux/spinlock_api_smp.h:151 kernel/locking/spinlock.c:194) 
[ 3.995308][ T0] ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:50 (discriminator 22)) 
[ 3.996312][ T0] ? _raw_spin_unlock_irqrestore (arch/x86/include/asm/irqflags.h:45 arch/x86/include/asm/irqflags.h:80 arch/x86/include/asm/irqflags.h:138 include/linux/spinlock_api_smp.h:151 kernel/locking/spinlock.c:194) 
[ 3.997319][ T0] vfs_caches_init (fs/dcache.c:3295) 
[ 3.999313][ T0] start_kernel (init/main.c:1123) 
[ 4.000320][ T0] secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:300) 
[    4.001349][    T0]  </TASK>
[    4.002309][    T0] irq event stamp: 2311
[ 4.003308][ T0] hardirqs last enabled at (2321): __up_console_sem (arch/x86/include/asm/irqflags.h:45 (discriminator 1) arch/x86/include/asm/irqflags.h:80 (discriminator 1) arch/x86/include/asm/irqflags.h:138 (discriminator 1) kernel/printk/printk.c:256 (discriminator 1)) 
[ 4.004313][ T0] hardirqs last disabled at (2330): __up_console_sem (kernel/printk/printk.c:254 (discriminator 1)) 
[ 4.005309][ T0] softirqs last enabled at (0): 0x0 
[ 4.006314][ T0] softirqs last disabled at (0): 0x0 
[    4.007312][    T0] ---[ end trace 0000000000000000 ]---
Poking KASLR using RDTSC...
[    4.013584][    T0] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[    4.014305][    T0] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[    4.015329][    T0] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    4.016318][    T0] Spectre V2 : Mitigation: Full generic retpoline
[    4.017305][    T0] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[    4.018307][    T0] Speculative Store Bypass: Vulnerable
[    4.019337][    T0] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[    4.028751][    T0] Freeing SMP alternatives memory: 40K
[    4.030698][    T1] smpboot: CPU0: Intel Xeon E312xx (Sandy Bridge) (family: 0x6, model: 0x2a, stepping: 0x1)
[    4.032896][    T1] cblist_init_generic: Setting adjustable number of callback queues.
[    4.033312][    T1] cblist_init_generic: Setting shift to 1 and lim to 1.
[    4.034658][    T1] cblist_init_generic: Setting shift to 1 and lim to 1.
[    4.035537][    T1] Running RCU-tasks wait API self tests
[    4.036793][    T1] Performance Events: unsupported p6 CPU model 42 no PMU driver, software events only.
[    4.037688][    T1] rcu: Hierarchical SRCU implementation.
[    4.043395][   T10] Callback from call_rcu_tasks_trace() invoked.
[    4.045071][    T1] NMI watchdog: Perf NMI watchdog permanently disabled
[    4.046006][    T1] smp: Bringing up secondary CPUs ...
[    4.047886][    T1] x86: Booting SMP configuration:
[    4.048326][    T1] .... node  #0, CPUs:      #1
[    0.245211][    T0] masked ExtINT on CPU#1
[    0.245211][    T0] smpboot: CPU 1 Converting physical 0 to logical die 1
[    4.078488][    T1] smp: Brought up 1 node, 2 CPUs
[    4.079334][    T1] smpboot: Max logical packages: 2
[    4.080316][    T1] smpboot: Total of 2 processors activated (9043.99 BogoMIPS)
[    4.147690][    T9] Callback from call_rcu_tasks_rude() invoked.
[    4.380370][   T21] node 0 deferred pages initialised in 297ms
[    4.513597][    T1] allocated 201326592 bytes of page_ext
[    4.514660][    T1] Node 0, zone      DMA: page owner found early allocated 0 pages
[    4.521659][    T1] Node 0, zone    DMA32: page owner found early allocated 0 pages
[    4.562068][    T1] Node 0, zone   Normal: page owner found early allocated 50463 pages
[    4.563464][    T1] devtmpfs: initialized
[    4.565474][    T1] x86/mm: Memory block size: 128MB
[    4.621220][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    4.621383][    T1] futex hash table entries: 512 (order: 4, 65536 bytes, linear)
[    4.623068][    T1] pinctrl core: initialized pinctrl subsystem
[    4.625838][    T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    4.629511][    T1] audit: initializing netlink subsys (disabled)
[    4.633582][   T27] audit: type=2000 audit(1643043463.357:1): state=initialized audit_enabled=0 res=1
[    4.633893][    T1] thermal_sys: Registered thermal governor 'fair_share'
[    4.634312][    T1] thermal_sys: Registered thermal governor 'bang_bang'
[    4.635316][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    4.636315][    T1] thermal_sys: Registered thermal governor 'user_space'
[    4.637493][    T1] cpuidle: using governor menu
[    4.640928][    T1] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    4.642786][    T1] PCI: Using configuration type 1 for base access
[    4.717204][    T1] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    4.719606][    T1] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    4.723437][    T1] cryptd: max_cpu_qlen set to 1000
[    4.728040][    T1] ACPI: Added _OSI(Module Device)
[    4.728315][    T1] ACPI: Added _OSI(Processor Device)
[    4.729315][    T1] ACPI: Added _OSI(3.0 _SCP Extensions)
[    4.730319][    T1] ACPI: Added _OSI(Processor Aggregator Device)
[    4.731351][    T1] ACPI: Added _OSI(Linux-Dell-Video)
[    4.732334][    T1] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    4.733338][    T1] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    4.798850][    T1] ACPI: 1 ACPI AML tables successfully acquired and loaded
[    4.814463][    T1] ACPI: Interpreter enabled
[    4.815609][    T1] ACPI: PM: (supports S0 S3 S4 S5)
[    4.816319][    T1] ACPI: Using IOAPIC for interrupt routing
[    4.817654][    T1] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    4.822488][    T1] ACPI: Enabled 2 GPEs in block 00 to 0F
[    4.947161][    T1] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    4.947405][    T1] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[    4.948319][    T1] acpi PNP0A03:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
[    4.949841][    T1] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[    4.962351][    T1] acpiphp: Slot [3] registered
[    4.963771][    T1] acpiphp: Slot [4] registered
[    4.964799][    T1] acpiphp: Slot [5] registered
[    4.965783][    T1] acpiphp: Slot [6] registered
[    4.966822][    T1] acpiphp: Slot [7] registered
[    4.967783][    T1] acpiphp: Slot [8] registered
[    4.968810][    T1] acpiphp: Slot [9] registered
[    4.969785][    T1] acpiphp: Slot [10] registered
[    4.970792][    T1] acpiphp: Slot [11] registered


To reproduce:

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



---
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-next-20220111-00002-g86522249760a" of type "text/plain" (178349 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ