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: Thu, 4 Apr 2024 18:54:38 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	Orson Zhai <orsonzhai@...il.com>,
	Baolin Wang <baolin.wang@...ux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@...il.com>
Subject: Re: [PATCH v1 0/3] serial: Do not count XON/XOFF in the statistics

On Thu, Apr 04, 2024 at 07:16:55AM +0200, Jiri Slaby wrote:
> On 04. 04. 24, 0:15, Andy Shevchenko wrote:
> > Wed, Apr 03, 2024 at 05:46:14PM +0300, Andy Shevchenko kirjoitti:
> > > Some drivers count XON/XOFF in the Tx statistics, some do not.
> > > I actually a bit uncertain, but I _think_ the correct way is not
> > > to count them, hence this series.
> > 
> > Okay, it seems there are much more drivers doing that. Perhaps we need
> > to add that to the rest in this case (i.o.w. invert the series from removal
> > to addition)?
> 
> Interesting, perhaps cut & paste?
> 
> XON and XOFF are overhead IMO. So should not be counted. When they are, they
> mangle statistics as in transmitted (real) bytes per second.
> 
> How are they handled on the RX side?

It took me a while.

All serial drivers accept everything and those that care, update statics for
anything they receive. This is because of layering. The Rx XON/XOFF seems
(note I am completely unfamiliar with mysterious ways of TTY layers) to be
handled on TTY level by n_tty_receive_char_flow_ctrl(), i.o.w. we may not
skip counting it easily.

Now the question is, shall we count the control characters on output or not?
Whatever decision we made, we should document (if not yet) and align drivers
accordingly.

Another Q is what do books / other OS / projects usually do with them
WRT statistics?

If we count everything on a wire, then we must count them, otherwise
it depends on how we treat them.

P.S.
This series as is should be abandoned. But we may continue discussing topic
under this cover letter.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ