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-next>] [day] [month] [year] [list]
Message-Id: <20250610092135.28738-1-cuiyunhui@bytedance.com>
Date: Tue, 10 Jun 2025 17:21:31 +0800
From: Yunhui Cui <cuiyunhui@...edance.com>
To: arnd@...db.de,
	andriy.shevchenko@...ux.intel.com,
	benjamin.larsson@...exis.eu,
	cuiyunhui@...edance.com,
	gregkh@...uxfoundation.org,
	heikki.krogerus@...ux.intel.com,
	ilpo.jarvinen@...ux.intel.com,
	jirislaby@...nel.org,
	jkeeping@...usicbrands.com,
	john.ogness@...utronix.de,
	linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org,
	markus.mayer@...aro.org,
	matt.porter@...aro.org,
	namcao@...utronix.de,
	paulmck@...nel.org,
	pmladek@...e.com,
	schnelle@...ux.ibm.com,
	sunilvl@...tanamicro.com,
	tim.kryger@...aro.org
Subject: [PATCH v9 0/4] Serial: 8250: Fix PSLVERR related issues

Cause of PSLVERR:
When the PSLVERR_RESP_EN parameter is set to 1, the device generates
an error response if an attempt is made to read an empty RBR
(Receive Buffer Register) while the FIFO is enabled.

Patch[1]: Fixes a panic caused by PSLVERR due to concurrent UART access.
Patch[2]: Fixes a panic caused by PSLVERR during RX_TIMEOUT conditions.
Patch[3] & Patch[4]: Improvements to minimize the occurrence of PSLVERR.

v1 -> v2:
Added UART_LSR_DR check in shutdown() to avoid PSLVERR issues.
Added Fixes: tag to reference upstream issues.
v2 -> v3:
Added lock protection in more functions (e.g., autoconfig_irq()) to
ensure atomicity.
Used lockdep_assert_held_once to detect potential deadlock risks early.
v3 -> v4:
Introduced serial8250_discard_data() to unify data read logic and avoid
code duplication.
Addressed PSLVERR caused by RX_TIMEOUT.
Split complex fixes into multiple patches (1/4 to 4/4).
v4 -> v5:
Removed reads from UART_FCR, using up->fcr to determine FIFO enable status.
Removed return value from serial8250_discard_data().
v5 -> v6:
Based on latest linux-next code: Resolved redundant dont_test_tx_en code.
Updated comments and git commit descriptions.
v6 -> v7:
Reverted PSLVERR-related changes in serial8250_get_poll_char().
v7 -> v8:
Added Cc: stable@...r.kernel.org to patch[1] and patch[4].
v8 -> v9:
Reordered the patches: bugfixes as 1-2, improvements as 3-4.

Yunhui Cui (4):
  serial: 8250: fix panic due to PSLVERR
  serial: 8250_dw: fix PSLVERR on RX_TIMEOUT
  serial: 8250: avoid potential PSLVERR issue
  serial: 8250_dw: assert port->lock is held in dw8250_force_idle()

 drivers/tty/serial/8250/8250.h      | 13 +++++++++++++
 drivers/tty/serial/8250/8250_dw.c   | 14 +++++++++++++-
 drivers/tty/serial/8250/8250_port.c | 29 +++++++++++++++++------------
 3 files changed, 43 insertions(+), 13 deletions(-)

-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ