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]
Message-ID: <5587C53A.9080308@gmx.at>
Date:	Mon, 22 Jun 2015 10:20:10 +0200
From:	Manfred Schlaegl <manfred.schlaegl@....at>
To:	Alexander Stein <alexander.stein@...tec-electronic.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Manfred Schlaegl <manfred.schlaegl@...zinger.com>
Subject: Re: [PATCH] serial: imx: reduce irq-latency after rx overflow

On 2015-06-22 08:48, Alexander Stein wrote:
> Am Samstag, 20. Juni 2015, 19:25:52 schrieb Manfred Schlaegl:
>> To prevent problems with interrupt latency, and due to the fact, that
>> the error will be counted anyway (icount.overrun), the dev_err is simply
>> removed.
>>
>> Background:
>> If an rx-fifo overflow occurs a dev_err message was called in interrupt
>> context. Since dev_err messages are written to console in a synchronous way
>> (unbuffered), and console may be a serial terminal, this leads to a
>> highly increased interrupt-latency (several milliseconds).
>> As a result of the high latency more rx-fifo overflows will happen, and
>> therefore a feedback loop of errors is created.
> 
> I understand your rationale but removing this error message from kernel log removes the possibility to detect serial overruns by simply check the kernel log or output on kernel console. AFAICS you have to use TIOCGICOUNT to get the error counters.
> How about introducing a rate limit for this kernel message?
> 

Hello!

I understand your argument, but:
 1. In my personal opinion kernel error messages should only be used on internal errors (missing resources, asserts, ...) and in cases where no other way is (yet) available to report errors (by counters, return values, ...). Lost RX bytes on uarts seem more like a communication error and should be silently handled by higher layers using error counters, or protocol internal mechanisms.
 2. I have found no other serial driver (except serial-tegra and imx) that reports this kind of errors using kernel messages.
 3. Error counters for serial interfaces can also be retrieved from userspace by using procfs -> implemented in serial_core; e.g. /proc/tty/driver/IMX-uart.

best regards,
manfred


Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ