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: <OSBPR01MB29496E76BE5FD0C5BC56D0F0C1FD0@OSBPR01MB2949.jpnprd01.prod.outlook.com>
Date:   Thu, 12 Mar 2020 05:10:05 +0000
From:   "torii.ken1@...itsu.com" <torii.ken1@...itsu.com>
To:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "geert@...ux-m68k.org" <geert@...ux-m68k.org>,
        "erosca@...adit-jv.com" <erosca@...adit-jv.com>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>,
        "wsa+renesas@...g-engineering.com" <wsa+renesas@...g-engineering.com>,
        "yoshihiro.shimoda.uh@...esas.com" <yoshihiro.shimoda.uh@...esas.com>,
        "uli+renesas@...nd.eu" <uli+renesas@...nd.eu>,
        "george_davis@...tor.com" <george_davis@...tor.com>,
        "andrew_gabbasov@...tor.com" <andrew_gabbasov@...tor.com>,
        "jiada_wang@...tor.com" <jiada_wang@...tor.com>,
        "yuichi.kusakabe@...so-ten.com" <yuichi.kusakabe@...so-ten.com>,
        "yasano@...adit-jv.com" <yasano@...adit-jv.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jslaby@...e.com" <jslaby@...e.com>,
        "yohhei.fukui@...so-ten.com" <yohhei.fukui@...so-ten.com>,
        "torii.ken1@...itsu.com" <torii.ken1@...itsu.com>,
        "ashiduka@...itsu.com" <ashiduka@...itsu.com>,
        "magnus.damm@...il.com" <magnus.damm@...il.com>
Subject: Re: [PATCH] serial: sh-sci: Support custom speed setting

Dear Greg,

On Tue, 11 Feb 2020 05:57:35 +0900,
Greg Kroah-Hartman wrote:
> 
> On Thu, Jan 30, 2020 at 01:32:50PM +0100, Geert Uytterhoeven wrote:
> > Hi Eugeniu,
> > 
> > On Wed, Jan 29, 2020 at 5:20 PM Eugeniu Rosca <erosca@...adit-jv.com> wrote:
> > > From: Torii Kenichi <torii.ken1@...fujitsu.com>
> > >
> > > This patch is necessary to use BT module and XM module with DENSO TEN
> > > development board.
> > >
> > > This patch supports ASYNC_SPD_CUST flag by ioctl(TIOCSSERIAL), enables
> > > custom speed setting with setserial(1).
> > >
> > > The custom speed is calculated from uartclk and custom_divisor.
> > > If custom_divisor is zero, custom speed setting is invalid.
> > >
> > > Signed-off-by: Torii Kenichi <torii.ken1@...fujitsu.com>
> > > [erosca: rebase against v5.5]
> > > Signed-off-by: Eugeniu Rosca <erosca@...adit-jv.com>
> > 
> > Thanks for your patch!
> > 
> > While this seems to work fine[*], I have a few comments/questions:
> >   1. This feature seems to be deprecated:
> > 
> >          sh-sci e6e68000.serial: setserial sets custom speed on
> > ttySC1. This is deprecated.
> > 
> >   2. As the wanted speed is specified as a divider, the resulting speed
> >      may be off, cfr. the example for 57600 below.
> >      Note that the SCIF device has multiple clock inputs, and can do
> >      57600 perfectly if the right crystal has been fitted.
> > 
> >  3. What to do with "[PATCH/RFC] serial: sh-sci: Update uartclk based
> >      on selected clock" (https://patchwork.kernel.org/patch/11103703/)?
> >      Combined with this, things become pretty complicated and
> >      unpredictable, as uartclk now always reflect the frequency of the
> >      last used base clock, which was the optimal one for the previously
> >      used speed....
> > 
> > I think it would be easier if we just had an API to specify a raw speed.
> > Perhaps that already exists?
> 
> Yes, see:
> 	http://www.panix.com/~grante/arbitrary-baud.c

I saw the code above, I thought I wouldn't write such code normally.

>#include <linux/termios.h>
>
>int ioctl(int d, int request, ...);

Do application programmers have to accept this bad code?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ