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: <aXodg7E6dkqS2e37@smile.fi.intel.com>
Date: Wed, 28 Jan 2026 16:37:31 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>, linux-serial@...r.kernel.org,
	qianfan Zhao <qianfanguijin@....com>,
	Adriana Nicolae <adriana@...sta.com>,
	Jamie Iles <jamie@...ieiles.com>, linux-kernel@...r.kernel.org,
	"Bandal, Shankar" <shankar.bandal@...el.com>,
	"Murthy, Shanth" <shanth.murthy@...el.com>, stable@...r.kernel.org
Subject: Re: [PATCH v2 6/7] serial: 8250: Add late synchronize_irq() to
 shutdown to handle DW UART BUSY

On Wed, Jan 28, 2026 at 12:53:00PM +0200, Ilpo Järvinen wrote:
> When DW UART is !uart_16550_compatible, it can indicate BUSY at any
> point (when under constant Rx pressure) unless a complex sequence of
> steps is performed. Any LCR write can run a foul with the condition
> that prevents writing LCR while the UART is BUSY, which triggers
> BUSY_DETECT interrupt that seems unmaskable using IER bits.
> 
> Normal flow is that dw8250_handle_irq() handles BUSY_DETECT condition
> by reading USR register. This BUSY feature, however, breaks the
> assumptions made in serial8250_do_shutdown(), which runs
> synchronize_irq() after clearing IER and assumes no interrupts can
> occur after that point but then proceeds to update LCR, which on DW
> UART can trigger an interrupt.
> 
> If serial8250_do_shutdown() releases the interrupt handler before the
> handler has run and processed the BUSY_DETECT condition by read the USR
> register, the IRQ is not deasserted resulting in interrupt storm that
> triggers "irq x: nobody cared" warning leading to disabling the IRQ.
> 
> Add late synchronize_irq() into serial8250_do_shutdown() to ensure
> BUSY_DETECT from DW UART is handled before port's interrupt handler is
> released. Alternative would be to add DW UART specific shutdown
> function but it would mostly duplicate the generic code and the extra
> synchronize_irq() seems pretty harmless in serial8250_do_shutdown().

Dunno if the triggered interrupt may lead to a new DMA transfers (since
this is generic 8520 code...) in some cases. Anyway I've just sent a patch
that is Cc'ed to you to prevent that from happening. Not sure if it needs
to be incorporated into your series or should have a Fixes tag.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ