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>] [day] [month] [year] [list]
Message-ID: <20220510140545.GA6990@xsang-OptiPlex-9020>
Date:   Tue, 10 May 2022 22:05:45 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
        lkp@...el.com
Subject: [serial]  e710b56c9d:
 BUG:sleeping_function_called_from_invalid_context_at_kernel/async.c



Greeting,

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

commit: e710b56c9dba7d06f51d20712301c3104197f63c ("serial: 8250: implement write_atomic")
https://git.kernel.org/cgit/linux/kernel/git/rt/linux-rt-devel.git linux-5.18.y-rt-rebase

in testcase: boot

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

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>


[   10.543235][    T1] BUG: sleeping function called from invalid context at kernel/async.c:274
[   10.543241][    T1] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper
[   10.543244][    T1] preempt_count: 0, expected: 0
[   10.543247][    T1] 3 locks held by swapper/1:
[ 10.543250][ T1] #0: d098495c (port_mutex){+.+.}-{3:3}, at: uart_add_one_port (??:?) 
[ 10.543277][ T1] #1: c10f91a8 (&port->mutex){+.+.}-{3:3}, at: uart_add_one_port (??:?) 
[ 10.543292][ T1] #2: d08057a8 (console_lock){+.+.}-{0:0}, at: autoconfig_irq (8250_port.c:?) 
[   10.543309][    T1] irq event stamp: 105854
[ 10.543311][ T1] hardirqs last enabled at (105853): __raw_spin_unlock_irqrestore (spinlock.c:?) 
[ 10.543321][ T1] hardirqs last disabled at (105854): autoconfig_irq (8250_port.c:?) 
[ 10.543329][ T1] softirqs last enabled at (105224): __do_softirq (??:?) 
[ 10.543341][ T1] softirqs last disabled at (105219): call_on_stack (irq_32.c:?) 
[   10.543355][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.18.0-rc6-00017-ge710b56c9dba #2
[   10.543360][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[   10.543364][    T1] Call Trace:
[ 10.543373][ T1] dump_stack_lvl (??:?) 
[ 10.543382][ T1] dump_stack (??:?) 
[ 10.543388][ T1] __might_resched (??:?) 
[ 10.543404][ T1] __might_sleep (??:?) 
[ 10.543415][ T1] async_synchronize_cookie_domain (??:?) 
[ 10.543422][ T1] ? console_lock (??:?) 
[ 10.543438][ T1] async_synchronize_full_domain (??:?) 
[ 10.543446][ T1] async_synchronize_full (??:?) 
[ 10.543451][ T1] probe_irq_on (??:?) 
[ 10.543465][ T1] autoconfig_irq (8250_port.c:?) 
[ 10.543472][ T1] ? autoconfig (8250_port.c:?) 
[ 10.543488][ T1] serial8250_config_port (8250_port.c:?) 
[ 10.543498][ T1] uart_configure_port+0xc6/0x235 
[ 10.543510][ T1] uart_add_one_port (??:?) 
[ 10.543522][ T1] serial8250_init (8250_core.c:?) 
[ 10.543531][ T1] ? univ8250_console_init (8250_core.c:?) 
[ 10.543542][ T1] do_one_initcall (??:?) 
[ 10.543553][ T1] ? rdinit_setup (main.c:?) 
[ 10.543573][ T1] ? lock_is_held (workqueue.c:?) 
[ 10.543592][ T1] do_initcalls (main.c:?) 
[ 10.543606][ T1] kernel_init_freeable (main.c:?) 
[ 10.543612][ T1] ? rest_init (main.c:?) 
[ 10.543623][ T1] kernel_init (main.c:?) 
[ 10.543630][ T1] ret_from_fork (??:?) 
[   10.861288][    T1] ------------[ cut here ]------------
[   10.861300][    T1] raw_local_irq_restore() called with IRQs enabled
[ 10.861320][ T1] WARNING: CPU: 0 PID: 1 at kernel/locking/irqflag-debug.c:10 warn_bogus_irq_restore (??:?) 
[   10.861369][    T1] Modules linked in:
[   10.861385][    T1] CPU: 0 PID: 1 Comm: swapper Tainted: G        W         5.18.0-rc6-00017-ge710b56c9dba #2
[   10.861395][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 10.861404][ T1] EIP: warn_bogus_irq_restore (??:?) 
[ 10.861417][ T1] Code: ff 75 04 68 04 d5 20 d0 e8 37 d7 fd ff 80 3d ee 8d b5 d0 00 75 19 55 c6 05 ee 8d b5 d0 01 89 e5 68 c0 21 21 d0 e8 a0 d3 fd ff <0f> 0b 58 c9 c3 c3 55 83 fa 07 89 e5 53 89 d3 76 24 e8 bd 6a 6a ff
All code
========
   0:	ff 75 04             	pushq  0x4(%rbp)
   3:	68 04 d5 20 d0       	pushq  $0xffffffffd020d504
   8:	e8 37 d7 fd ff       	callq  0xfffffffffffdd744
   d:	80 3d ee 8d b5 d0 00 	cmpb   $0x0,-0x2f4a7212(%rip)        # 0xffffffffd0b58e02
  14:	75 19                	jne    0x2f
  16:	55                   	push   %rbp
  17:	c6 05 ee 8d b5 d0 01 	movb   $0x1,-0x2f4a7212(%rip)        # 0xffffffffd0b58e0c
  1e:	89 e5                	mov    %esp,%ebp
  20:	68 c0 21 21 d0       	pushq  $0xffffffffd02121c0
  25:	e8 a0 d3 fd ff       	callq  0xfffffffffffdd3ca
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	58                   	pop    %rax
  2d:	c9                   	leaveq 
  2e:	c3                   	retq   
  2f:	c3                   	retq   
  30:	55                   	push   %rbp
  31:	83 fa 07             	cmp    $0x7,%edx
  34:	89 e5                	mov    %esp,%ebp
  36:	53                   	push   %rbx
  37:	89 d3                	mov    %edx,%ebx
  39:	76 24                	jbe    0x5f
  3b:	e8 bd 6a 6a ff       	callq  0xffffffffff6a6afd

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	58                   	pop    %rax
   3:	c9                   	leaveq 
   4:	c3                   	retq   
   5:	c3                   	retq   
   6:	55                   	push   %rbp
   7:	83 fa 07             	cmp    $0x7,%edx
   a:	89 e5                	mov    %esp,%ebp
   c:	53                   	push   %rbx
   d:	89 d3                	mov    %edx,%ebx
   f:	76 24                	jbe    0x35
  11:	e8 bd 6a 6a ff       	callq  0xffffffffff6a6ad3
[   10.861428][    T1] EAX: 00000030 EBX: d169eca0 ECX: 00000001 EDX: d04e55e4
[   10.861437][    T1] ESI: 00000004 EDI: 00000200 EBP: c10c3ea4 ESP: c10c3ea0
[   10.861445][    T1] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010292
[   10.861459][    T1] CR0: 80050033 CR2: ffd97000 CR3: 10c73000 CR4: 000006d0
[   10.861469][    T1] Call Trace:
[ 10.861482][ T1] autoconfig_irq (8250_port.c:?) 
[ 10.861511][ T1] serial8250_config_port (8250_port.c:?) 
[ 10.861528][ T1] uart_configure_port+0xc6/0x235 
[ 10.861545][ T1] uart_add_one_port (??:?) 
[ 10.861561][ T1] serial8250_init (8250_core.c:?) 
[ 10.861576][ T1] ? univ8250_console_init (8250_core.c:?) 
[ 10.861590][ T1] do_one_initcall (??:?) 
[ 10.861606][ T1] ? rdinit_setup (main.c:?) 
[ 10.861630][ T1] ? lock_is_held (workqueue.c:?) 
[ 10.861653][ T1] do_initcalls (main.c:?) 
[ 10.861673][ T1] kernel_init_freeable (main.c:?) 
[ 10.861684][ T1] ? rest_init (main.c:?) 
[ 10.861697][ T1] kernel_init (main.c:?) 
[ 10.861708][ T1] ret_from_fork (??:?) 
[   10.861743][    T1] irq event stamp: 106291
[ 10.861751][ T1] hardirqs last enabled at (106297): console_trylock_spinning (printk.c:?) 
[ 10.861767][ T1] hardirqs last disabled at (106302): console_trylock_spinning (printk.c:?) 
[ 10.861778][ T1] softirqs last enabled at (105224): __do_softirq (??:?) 
[ 10.861792][ T1] softirqs last disabled at (105219): call_on_stack (irq_32.c:?) 
[   10.861808][    T1] ---[ end trace 0000000000000000 ]---
[   10.861829][    T1] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[   11.181279][    T1] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[   11.263071][    T1] platform pc8736x_gpio.0: NatSemi pc8736x GPIO Driver Initializing
[   11.263146][    T1] platform pc8736x_gpio.0: no device found
[   11.263350][    T1] nsc_gpio initializing
[   11.263392][    T1] telclk_interrupt = 0xf non-mcpbl0010 hw.
[   11.263412][    T1] Linux agpgart interface v0.103
[   11.265854][    T1] habanalabs: loading driver
[   11.279773][    T1] e1000: Intel(R) PRO/1000 Network Driver
[   11.279785][    T1] e1000: Copyright (c) 1999-2006 Intel Corporation.
[   12.124782][    T1] ACPI: _SB_.LNKC: Enabled at IRQ 11
[   12.611096][    T1] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
[   12.611217][    T1] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[   12.613568][    T1] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   12.613765][    T1] usbcore: registered new interface driver cdc_wdm
[   12.613967][    T1] usbcore: registered new interface driver usbserial_generic
[   12.614115][    T1] usbserial: USB Serial support registered for generic
[   12.614194][    T1] usbcore: registered new interface driver cypress_m8
[   12.618331][    T1] usbserial: USB Serial support registered for DeLorme Earthmate USB
[   12.618404][    T1] usbserial: USB Serial support registered for HID->COM RS232 Adapter
[   12.618466][    T1] usbserial: USB Serial support registered for Nokia CA-42 V2 Adapter
[   12.618572][    T1] usbcore: registered new interface driver digi_acceleport
[   12.618631][    T1] usbserial: USB Serial support registered for Digi 2 port USB adapter
[   12.618690][    T1] usbserial: USB Serial support registered for Digi 4 port USB adapter
[   12.618765][    T1] usbcore: registered new interface driver io_edgeport
[   12.618826][    T1] usbserial: USB Serial support registered for Edgeport 2 port adapter
[   12.618888][    T1] usbserial: USB Serial support registered for Edgeport 4 port adapter
[   12.618952][    T1] usbserial: USB Serial support registered for Edgeport 8 port adapter
[   12.619015][    T1] usbserial: USB Serial support registered for EPiC device
[   12.619088][    T1] usbcore: registered new interface driver io_ti
[   12.619149][    T1] usbserial: USB Serial support registered for Edgeport TI 1 port adapter
[   12.619212][    T1] usbserial: USB Serial support registered for Edgeport TI 2 port adapter
[   12.619288][    T1] usbcore: registered new interface driver ipaq
[   12.619397][    T1] usbserial: USB Serial support registered for PocketPC PDA
[   12.619473][    T1] usbcore: registered new interface driver ipw
[   12.619537][    T1] usbserial: USB Serial support registered for IPWireless converter
[   12.619615][    T1] usbcore: registered new interface driver ir_usb
[   12.619677][    T1] usbserial: USB Serial support registered for IR Dongle
[   12.619754][    T1] usbcore: registered new interface driver iuu_phoenix
[   12.619815][    T1] usbserial: USB Serial support registered for iuu_phoenix
[   12.619892][    T1] usbcore: registered new interface driver kl5kusb105
[   12.619969][    T1] usbserial: USB Serial support registered for KL5KUSB105D / PalmConnect
[   12.620047][    T1] usbcore: registered new interface driver mct_u232
[   12.620108][    T1] usbserial: USB Serial support registered for MCT U232
[   12.630676][    T1] usbcore: registered new interface driver mos7840
[   12.630761][    T1] usbserial: USB Serial support registered for Moschip 7840/7820 USB Serial Driver
[   12.630852][    T1] usbcore: registered new interface driver mxuport
[   12.630916][    T1] usbserial: USB Serial support registered for MOXA UPort
[   12.631005][    T1] usbcore: registered new interface driver omninet
[   12.631070][    T1] usbserial: USB Serial support registered for ZyXEL - omni.net usb
[   12.631147][    T1] usbcore: registered new interface driver quatech2
[   12.631212][    T1] usbserial: USB Serial support registered for Quatech 2nd gen USB to Serial Driver
[   12.631290][    T1] usbcore: registered new interface driver sierra
[   12.631355][    T1] usbserial: USB Serial support registered for Sierra USB modem
[   12.631434][    T1] usbcore: registered new interface driver ssu100
[   12.631497][    T1] usbserial: USB Serial support registered for Quatech SSU-100 USB to Serial Driver
[   12.631591][    T1] usbcore: registered new interface driver symbolserial
[   12.631655][    T1] usbserial: USB Serial support registered for symbol
[   12.631731][    T1] usbcore: registered new interface driver visor
[   12.631794][    T1] usbserial: USB Serial support registered for Handspring Visor / Palm OS
[   12.631858][    T1] usbserial: USB Serial support registered for Sony Clie 5.0
[   12.631920][    T1] usbserial: USB Serial support registered for Sony Clie 3.5
[   12.631998][    T1] usbcore: registered new interface driver xsens_mt
[   12.632062][    T1] usbserial: USB Serial support registered for xsens_mt
[   12.632157][    T1] usbcore: registered new interface driver adutux
[   12.632245][    T1] usbcore: registered new interface driver idmouse
[   12.632353][    T1] usbcore: registered new interface driver isight_firmware
[   12.633031][    T1] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[   12.635068][    T1] serio: i8042 KBD port at 0x60,0x64 irq 1
[   12.635166][    T1] serio: i8042 AUX port at 0x60,0x64 irq 12
[   12.645185][   T30] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[   12.647416][    T1] usbcore: registered new interface driver pxrc
[   12.651256][    T1] usbcore: registered new interface driver i2c-diolan-u2c
[   12.651347][    T1] usbcore: registered new interface driver i2c-cp2615
[   12.661702][    T1] pps pps0: new PPS source ktimer
[   12.661720][    T1] pps pps0: ktimer PPS source registered
[   12.661727][    T1] pps_ldisc: PPS line discipline registered
[   12.661730][    T1] Driver for 1-wire Dallas network protocol.
[   12.662095][    T1] DS1WM w1 busmaster driver - (c) 2004 Szabolcs Gyurko
[   12.664264][    T1] applesmc: supported laptop not found!
[   12.664267][    T1] applesmc: driver init failed (ret=-19)!
[   12.666973][    T1] intel_powerclamp: CPU does not support MWAIT


To reproduce:

        # build kernel
	cd linux
	cp config-5.18.0-rc6-00017-ge710b56c9dba .config
	make HOSTCC=gcc-11 CC=gcc-11 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=gcc-11 CC=gcc-11 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.



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



View attachment "config-5.18.0-rc6-00017-ge710b56c9dba" of type "text/plain" (145486 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ