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:	Wed, 14 May 2014 10:08:07 -0500
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Daniel Thompson <daniel.thompson@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-serial@...r.kernel.org>
CC:	<patches@...aro.org>, <linaro-kernel@...ts.linaro.org>,
	<linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>,
	Anton Vorontsov <anton.vorontsov@...aro.org>,
	Colin Cross <ccross@...roid.com>, <kernel-team@...roid.com>,
	<kgdb-bugreport@...ts.sourceforge.net>,
	Jiri Slaby <jslaby@...e.cz>,
	Kumar Gala <galak@...nel.crashing.org>,
	Pantelis Antoniou <panto@...racom.gr>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Joe Schultz <jschultz@...-inc.com>,
	Loic Poulain <loic.poulain@...el.com>,
	Kyle McMartin <kyle@...radead.org>,
	Stephen Warren <swarren@...dia.com>,
	Ingo Molnar <mingo@...e.hu>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Jingoo Han <jg1.han@...sung.com>,
	Christophe Leroy <christophe.leroy@....fr>
Subject: Re: [PATCH 1/4] serial: core: Consistent LF handling for poll_put_char

On 05/14/2014 09:55 AM, Daniel Thompson wrote:
> The behaviour of the UART poll_put_char infrastructure is inconsistent
> with respect to linefeed conversions. This in turn leads to difficulty
> using kdb on serial ports that are not also consoles
> (e.g. console=ttyAMA0,115200 kgdboc=ttyAMA1,115200).
>
> The following drivers automatically convert '\n' to '\r\n' inside their
> own poll functions but the remaining seventeen do not:
>
>     serial8250, cpm, pch_uart, serial_pxa, serial_txx9,
>
> This can be made fully consistent but performing the conversion in
> uart_poll_put_char(). A similar conversion is already made inside
> uart_console_write() but it is optional for drivers to use this
> function. Fortunately we can be confident the translation is safe
> because the (very common) 8250 already does this translation.


I'll have to take a look at some of the other drivers.  If all the instances of the function calls are going to coded per driver, it might make more sense to add variable to struct uart_port, vs changing the number of arguments to uart_poll_put_char.  And then the default can simply be coded in the struct initialization to the most common need.

Cheers,
Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ