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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Jun 2022 23:00:13 +0300 (EEST)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Jiri Slaby <jirislaby@...nel.org>
cc:     linux-serial <linux-serial@...r.kernel.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        Neil Armstrong <narmstrong@...libre.com>,
        Kevin Hilman <khilman@...libre.com>,
        Jerome Brunet <jbrunet@...libre.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Andreas Färber <afaerber@...e.de>,
        Manivannan Sadhasivam <mani@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org,
        linux-actions@...ts.infradead.org, linux-unisoc@...ts.infradead.org
Subject: Re: [PATCH v2 5/6] serial: Use UART_XMIT_SIZE

On Thu, 23 Jun 2022, Jiri Slaby wrote:

> On 21. 06. 22, 14:49, Ilpo Järvinen wrote:
> > --- a/include/linux/serial.h
> > +++ b/include/linux/serial.h
> > @@ -9,7 +9,6 @@
> >   #ifndef _LINUX_SERIAL_H
> >   #define _LINUX_SERIAL_H
> >   -#include <asm/page.h>
> >   #include <uapi/linux/serial.h>
> >     /* Helper for dealing with UART_LCR_WLEN* defines */
> > @@ -25,11 +24,6 @@ struct async_icount {
> >   	__u32	buf_overrun;
> >   };
> >   -/*
> > - * The size of the serial xmit buffer is 1 page, or 4096 bytes
> > - */
> > -#define SERIAL_XMIT_SIZE PAGE_SIZE
> > -
> >   #include <linux/compiler.h>
> >     #endif /* _LINUX_SERIAL_H */
> > diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> > index 5518b70177b3..1767dee98021 100644
> > --- a/include/linux/serial_core.h
> > +++ b/include/linux/serial_core.h
> > @@ -296,6 +296,7 @@ struct uart_state {
> >   	struct uart_port	*uart_port;
> >   };
> >   +/* The size of the serial xmit buffer is 1 page, or 4096 bytes */
> 
> That is not completely true, I'd remove the "or" part. Hmm, but then the
> comment is somehow superfluous as it says what we can see below. So maybe
> don't add it at all?
> 
> >   #define UART_XMIT_SIZE	PAGE_SIZE

Yeah, the comment is probably not that useful. I managed to get into  
an "autopilot mode" with a sole goal to preserve the comment rather than 
thinking/reading it through whether it's worth preserving.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ