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: <CWMKPFZ9LOVD.2756QU9AP6U3W@tleb-bootlin-xps13-01>
Date:   Tue, 31 Oct 2023 12:04:11 +0100
From:   Théo Lebrun <theo.lebrun@...tlin.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     "Hugo Villeneuve" <hugo@...ovil.com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Jiri Slaby" <jirislaby@...nel.org>,
        <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>,
        "Linus Walleij" <linus.walleij@...aro.org>,
        "Gregory CLEMENT" <gregory.clement@...tlin.com>,
        "Alexandre Belloni" <alexandre.belloni@...tlin.com>,
        "Thomas Petazzoni" <thomas.petazzoni@...tlin.com>,
        "Vladimir Kondratiev" <vladimir.kondratiev@...ileye.com>,
        "Tawfik Bayouk" <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 6/6] tty: serial: amba-pl011: Parse bits option as 5, 6,
 7 or 8 in _get_options

Hello,

On Tue Oct 31, 2023 at 11:11 AM CET, Russell King (Oracle) wrote:
> There is no point in supporting 5 or 6 bits for console usage. Think
> about it. What values are going to be sent over the console? It'll be
> ASCII, which requires at _least_ 7-bit. 6-bit would turn alpha
> characters into control characters, punctuation and numbers. 5-bit
> would be all control characters.
>
> So there's no point trying to do anything with 5 or 6 bits per byte,
> and I decided we might as well take that as an error (or maybe a
> case that the hardware has not been setup) and default to 8 bits per
> byte.

I see your point. Two things come to mind:

 - I added this parsing of 5/6 bits to be symmetrical with
   pl011_set_termios that handles 5/6 properly. Should pl011_set_termios
   be modified then?

 - If a value of 5 or 6 means the hardware has not been setup, shouldn't
   we ignore all other parsed values?

If you decide to keep the current behavior, I'd be down to adding a
comment to explicit this choice in pl011_console_get_options.

Regards,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

------------------------------------------------------------------------

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ