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] [day] [month] [year] [list]
Message-ID: <20250320111701.GI280585@kernel.org>
Date: Thu, 20 Mar 2025 11:17:01 +0000
From: Simon Horman <horms@...nel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Cc: gregkh@...uxfoundation.org, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org
Subject: Re: [PATCH v2 03/31] tty: caif: do not use N_TTY_BUF_SIZE

On Mon, Mar 17, 2025 at 08:00:18AM +0100, Jiri Slaby (SUSE) wrote:
> N_TTY_BUF_SIZE -- as the name suggests -- is the N_TTY's buffer size.
> There is no reason to couple that to caif's tty->receive_room. Use 4096
> directly -- even though, it should be some sort of "SKB_MAX_ALLOC" or
> alike. But definitely not N_TTY_BUF_SIZE.

Hi Jiri,

My 2c worth is that 4096 seems like an arbitrary value.
Which is fine, but perhaps a comment is warranted.

> 
> N_TTY_BUF_SIZE is private and will be moved to n_tty.c later.
> 
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
> Acked-by: Jakub Kicinski <kuba@...nel.org>
> Cc: Andrew Lunn <andrew+netdev@...n.ch>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: Paolo Abeni <pabeni@...hat.com>
> Cc: netdev@...r.kernel.org
> ---
>  drivers/net/caif/caif_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
> index ed3a589def6b..e7d1b9301fde 100644
> --- a/drivers/net/caif/caif_serial.c
> +++ b/drivers/net/caif/caif_serial.c
> @@ -344,7 +344,7 @@ static int ldisc_open(struct tty_struct *tty)
>  	ser->tty = tty_kref_get(tty);
>  	ser->dev = dev;
>  	debugfs_init(ser, tty);
> -	tty->receive_room = N_TTY_BUF_SIZE;
> +	tty->receive_room = 4096;
>  	tty->disc_data = ser;
>  	set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
>  	rtnl_lock();
> -- 
> 2.49.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ