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]
Date:   Thu, 31 Mar 2022 16:02:54 -0300
From:   Wander Lairson Costa <wander@...hat.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Johan Hovold <johan@...nel.org>,
        "Maciej W. Rozycki" <macro@...am.me.uk>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Lukas Wunner <lukas@...ner.de>,
        Wander Lairson Costa <wander@...hat.com>,
        Pali Rohár <pali@...nel.org>,
        linux-serial@...r.kernel.org (open list:SERIAL DRIVERS),
        linux-kernel@...r.kernel.org (open list)
Cc:     rostedt@...dmis.org, senozhatsky@...omium.org,
        andre.goddard@...il.com, sudipm.mukherjee@...il.com,
        andy.shevchenko@...il.com, David.Laight@...lab.com,
        jonathanh@...dia.com, phil@...pberrypi.com
Subject: [PATCH v5 0/1] serial/8250: Use fifo in 8250 console driver

This is v5 of the serial fifo patch. In relation to the previous
reverted patch, I describe the main changes in the "What changed from
v3" section.

What changed from v4
--------------------

* It squashes all the patches in a single patch
* It adds `port-state &&` check in the `use_fifo` condition as a
* preventive measure.

What changed from v3
--------------------

* Reads the FCR value from the port struct. The earlier patch
erroneously read the value from the controller, but FCR is a write-only
register. Thanks to Jiri Slaby for point this out.

* Use tx_loadsz as the transmitter fifo size. We previously used the
port->fifosize field, which caused data loss in some controllers. Thanks
Jon Hunter for the bug report.

* Exclude the BCM283x from fifo write. This is based on Phil Elwell's
original patch [1].

* Check if the port is initialized before write through fifo.
The serial driver set the value of uart_8250_port.fcr in the function
serial8250_config_port, but only writes the value to the controller
register later in the initalization code. That opens a small window in
which is not safe to use the fifo for console write. Unfortunately, I
lost track of who originally reported the issue. If s/he is reading
this, please speak up so I can give you the due credit.

[1] https://lore.kernel.org/all/20220126141124.4086065-1-phil@raspberrypi.com/

Wander Lairson Costa (1):
  serial/8250: Use fifo in 8250 console driver

 drivers/tty/serial/8250/8250_port.c | 68 ++++++++++++++++++++++++++---
 1 file changed, 62 insertions(+), 6 deletions(-)

-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ