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]
Date: Fri, 19 Apr 2024 17:12:28 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>, gregkh@...uxfoundation.org
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
 Al Cooper <alcooperx@...il.com>, Alexander Shiyan <shc_work@...l.ru>,
 Alexandre Belloni <alexandre.belloni@...tlin.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Alim Akhtar <alim.akhtar@...sung.com>,
 Andrew Morton <akpm@...ux-foundation.org>,
 "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 Baolin Wang <baolin.wang@...ux.alibaba.com>, Baruch Siach
 <baruch@...s.co.il>, Bjorn Andersson <andersson@...nel.org>,
 Claudiu Beznea <claudiu.beznea@...on.dev>,
 "David S. Miller" <davem@...emloft.net>, Fabio Estevam <festevam@...il.com>,
 Hammer Hsieh <hammerh0314@...il.com>,
 Christian König <christian.koenig@....com>,
 Christophe Leroy <christophe.leroy@...roup.eu>,
 Chunyan Zhang <zhang.lyra@...il.com>, Jerome Brunet <jbrunet@...libre.com>,
 Jonathan Hunter <jonathanh@...dia.com>, Kevin Hilman <khilman@...libre.com>,
 Konrad Dybcio <konrad.dybcio@...aro.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Kumaravel Thiagarajan <kumaravel.thiagarajan@...rochip.com>,
 Laxman Dewangan <ldewangan@...dia.com>,
 linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
 "Maciej W. Rozycki" <macro@...am.me.uk>,
 Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
 Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
 Matthias Brugger <matthias.bgg@...il.com>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>,
 Michael Ellerman <mpe@...erman.id.au>, Michal Simek <michal.simek@....com>,
 "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>,
 Nicolas Ferre <nicolas.ferre@...rochip.com>,
 Nicholas Piggin <npiggin@...il.com>, Orson Zhai <orsonzhai@...il.com>,
 Pali Rohár <pali@...nel.org>,
 Patrice Chotard <patrice.chotard@...s.st.com>,
 Peter Korsgaard <jacmet@...site.dk>,
 Richard Genoud <richard.genoud@...il.com>,
 Russell King <linux@...linux.org.uk>, Sascha Hauer <s.hauer@...gutronix.de>,
 Shawn Guo <shawnguo@...nel.org>, Stefani Seibold <stefani@...bold.net>,
 Sumit Semwal <sumit.semwal@...aro.org>,
 Taichi Sugaya <sugaya.taichi@...ionext.com>,
 Takao Orito <orito.takao@...ionext.com>,
 Tharun Kumar P <tharunkumar.pasumarthi@...rochip.com>,
 Thierry Reding <thierry.reding@...il.com>, Timur Tabi <timur@...nel.org>,
 Vineet Gupta <vgupta@...nel.org>
Subject: Re: [PATCH 00/15] tty: serial: switch from circ_buf to kfifo

Hi Jiri,

On 05/04/2024 08:08, Jiri Slaby (SUSE) wrote:
> This series switches tty serial layer to use kfifo instead of circ_buf.
> 
> The reasoning can be found in the switching patch in this series:
> """
> Switch from struct circ_buf to proper kfifo. kfifo provides much better
> API, esp. when wrap-around of the buffer needs to be taken into account.
> Look at pl011_dma_tx_refill() or cpm_uart_tx_pump() changes for example.
> 
> Kfifo API can also fill in scatter-gather DMA structures, so it easier
> for that use case too. Look at lpuart_dma_tx() for example. Note that
> not all drivers can be converted to that (like atmel_serial), they
> handle DMA specially.
> 
> Note that usb-serial uses kfifo for TX for ages.
> """
> 
> Cc: Al Cooper <alcooperx@...il.com>
> Cc: Alexander Shiyan <shc_work@...l.ru>
> Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
> Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>
> Cc: Alim Akhtar <alim.akhtar@...sung.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Cc: Baolin Wang <baolin.wang@...ux.alibaba.com>
> Cc: Baruch Siach <baruch@...s.co.il>
> Cc: Bjorn Andersson <andersson@...nel.org>
> Cc: Claudiu Beznea <claudiu.beznea@...on.dev>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Fabio Estevam <festevam@...il.com>
> Cc: Hammer Hsieh <hammerh0314@...il.com>
> Cc: "Christian König" <christian.koenig@....com>
> Cc: Christophe Leroy <christophe.leroy@...roup.eu>
> Cc: Chunyan Zhang <zhang.lyra@...il.com>
> Cc: Jerome Brunet <jbrunet@...libre.com>
> Cc: Jonathan Hunter <jonathanh@...dia.com>
> Cc: Kevin Hilman <khilman@...libre.com>
> Cc: Konrad Dybcio <konrad.dybcio@...aro.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> Cc: Kumaravel Thiagarajan <kumaravel.thiagarajan@...rochip.com>
> Cc: Laxman Dewangan <ldewangan@...dia.com>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-arm-msm@...r.kernel.org
> Cc: "Maciej W. Rozycki" <macro@...am.me.uk>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> Cc: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
> Cc: Matthias Brugger <matthias.bgg@...il.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Michal Simek <michal.simek@....com>
> Cc: "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>
> Cc: Neil Armstrong <neil.armstrong@...aro.org>
> Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>
> Cc: Nicholas Piggin <npiggin@...il.com>
> Cc: Orson Zhai <orsonzhai@...il.com>
> Cc: "Pali Rohár" <pali@...nel.org>
> Cc: Patrice Chotard <patrice.chotard@...s.st.com>
> Cc: Peter Korsgaard <jacmet@...site.dk>
> Cc: Richard Genoud <richard.genoud@...il.com>
> Cc: Russell King <linux@...linux.org.uk>
> Cc: Sascha Hauer <s.hauer@...gutronix.de>
> Cc: Shawn Guo <shawnguo@...nel.org>
> Cc: Stefani Seibold <stefani@...bold.net>
> Cc: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: Taichi Sugaya <sugaya.taichi@...ionext.com>
> Cc: Takao Orito <orito.takao@...ionext.com>
> Cc: Tharun Kumar P <tharunkumar.pasumarthi@...rochip.com>
> Cc: Thierry Reding <thierry.reding@...il.com>
> Cc: Timur Tabi <timur@...nel.org>
> Cc: Vineet Gupta <vgupta@...nel.org>
> 
> Jiri Slaby (SUSE) (15):
>    kfifo: drop __kfifo_dma_out_finish_r()
>    kfifo: introduce and use kfifo_skip_count()
>    kfifo: add kfifo_out_linear{,_ptr}()
>    kfifo: remove support for physically non-contiguous memory
>    kfifo: rename l to len_to_end in setup_sgl()
>    kfifo: pass offset to setup_sgl_buf() instead of a pointer
>    kfifo: add kfifo_dma_out_prepare_mapped()
>    kfifo: fix typos in kernel-doc
>    tty: 8250_dma: use dmaengine_prep_slave_sg()
>    tty: 8250_omap: use dmaengine_prep_slave_sg()
>    tty: msm_serial: use dmaengine_prep_slave_sg()
>    tty: serial: switch from circ_buf to kfifo
>    tty: atmel_serial: use single DMA mapping for TX
>    tty: atmel_serial: define macro for RX size
>    tty: atmel_serial: use single DMA mapping for RX
> 
>   drivers/tty/serial/8250/8250_bcm7271.c  |  14 +--
>   drivers/tty/serial/8250/8250_core.c     |   3 +-
>   drivers/tty/serial/8250/8250_dma.c      |  31 +++--
>   drivers/tty/serial/8250/8250_exar.c     |   5 +-
>   drivers/tty/serial/8250/8250_mtk.c      |   2 +-
>   drivers/tty/serial/8250/8250_omap.c     |  48 +++++---
>   drivers/tty/serial/8250/8250_pci1xxxx.c |  50 ++++----
>   drivers/tty/serial/8250/8250_port.c     |  22 ++--
>   drivers/tty/serial/amba-pl011.c         |  46 +++-----
>   drivers/tty/serial/ar933x_uart.c        |  15 ++-
>   drivers/tty/serial/arc_uart.c           |   8 +-
>   drivers/tty/serial/atmel_serial.c       | 150 +++++++++++-------------
>   drivers/tty/serial/clps711x.c           |  12 +-
>   drivers/tty/serial/cpm_uart.c           |  20 ++--
>   drivers/tty/serial/digicolor-usart.c    |  12 +-
>   drivers/tty/serial/dz.c                 |  13 +-
>   drivers/tty/serial/fsl_linflexuart.c    |  17 +--
>   drivers/tty/serial/fsl_lpuart.c         |  39 +++---
>   drivers/tty/serial/icom.c               |  25 +---
>   drivers/tty/serial/imx.c                |  54 ++++-----
>   drivers/tty/serial/ip22zilog.c          |  26 ++--
>   drivers/tty/serial/jsm/jsm_cls.c        |  29 ++---
>   drivers/tty/serial/jsm/jsm_neo.c        |  38 ++----
>   drivers/tty/serial/max3100.c            |  14 +--
>   drivers/tty/serial/max310x.c            |  35 +++---
>   drivers/tty/serial/men_z135_uart.c      |  26 ++--
>   drivers/tty/serial/meson_uart.c         |  11 +-
>   drivers/tty/serial/milbeaut_usio.c      |  15 +--
>   drivers/tty/serial/msm_serial.c         | 114 +++++++++---------
>   drivers/tty/serial/mvebu-uart.c         |   8 +-
>   drivers/tty/serial/mxs-auart.c          |  23 +---
>   drivers/tty/serial/pch_uart.c           |  21 ++--
>   drivers/tty/serial/pic32_uart.c         |  15 ++-
>   drivers/tty/serial/pmac_zilog.c         |  24 ++--
>   drivers/tty/serial/qcom_geni_serial.c   |  36 +++---
>   drivers/tty/serial/rda-uart.c           |  17 +--
>   drivers/tty/serial/samsung_tty.c        |  54 +++++----
>   drivers/tty/serial/sb1250-duart.c       |  13 +-
>   drivers/tty/serial/sc16is7xx.c          |  40 +++----
>   drivers/tty/serial/sccnxp.c             |  16 ++-
>   drivers/tty/serial/serial-tegra.c       |  43 ++++---
>   drivers/tty/serial/serial_core.c        |  56 ++++-----
>   drivers/tty/serial/serial_port.c        |   2 +-
>   drivers/tty/serial/sh-sci.c             |  51 ++++----
>   drivers/tty/serial/sprd_serial.c        |  20 ++--
>   drivers/tty/serial/st-asc.c             |   4 +-
>   drivers/tty/serial/stm32-usart.c        |  52 ++++----
>   drivers/tty/serial/sunhv.c              |  35 +++---
>   drivers/tty/serial/sunplus-uart.c       |  16 +--
>   drivers/tty/serial/sunsab.c             |  30 ++---
>   drivers/tty/serial/sunsu.c              |  15 +--
>   drivers/tty/serial/sunzilog.c           |  27 ++---
>   drivers/tty/serial/tegra-tcu.c          |  10 +-
>   drivers/tty/serial/timbuart.c           |  17 ++-
>   drivers/tty/serial/uartlite.c           |  13 +-
>   drivers/tty/serial/ucc_uart.c           |  20 ++--
>   drivers/tty/serial/xilinx_uartps.c      |  20 ++--
>   drivers/tty/serial/zs.c                 |  13 +-
>   include/linux/kfifo.h                   | 143 ++++++++++++++++------
>   include/linux/serial_core.h             |  49 +++++---
>   lib/kfifo.c                             | 107 +++++++++--------
>   61 files changed, 944 insertions(+), 960 deletions(-)
> 

This patchset has at least broken all Amlogic and Qualcomm boards so far, only part of them were fixed in next- but this serie has been merged in v1 with no serious testing and should've been dropped immediately when the first regressions were reported.

Thanks,
Neil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ