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: <CAMo8Bf+pXvSZGd0gkXbBd75gKb4dAJ1iNCxufxtud8yUdT5pyw@mail.gmail.com>
Date:   Fri, 29 Sep 2023 12:26:30 -0700
From:   Max Filippov <jcmvbkbc@...il.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        devicetree@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>
Subject: Re: [PATCH v4 1/5] serial: core: tidy invalid baudrate handling in uart_get_baud_rate

On Thu, Sep 28, 2023 at 11:34 PM Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com> wrote:
> While looking into this, I found this old commit:
>
> commit 16ae2a877bf4179737921235e85ceffd7b79354f
> Author: Alan Cox <alan@...ux.intel.com>
> Date:   Mon Jan 4 16:26:21 2010 +0000
>
>     serial: Fix crash if the minimum rate of the device is > 9600 baud
>
>     In that situation if the old rate is invalid and the new rate is invalid
>     and the chip cannot do 9600 baud we report zero, which makes all the
>     drivers explode.
>
>     Instead force the rate based on min/max
>
> But for some reason it does not work as advertized here? What is the exact
> cause for that?

In my case I see that tty_termios_encode_baud_rate() is called with
ibaud == obaud == 9769, but it finds the closest rate 9600, which is
within 2% of the actual minimum, but is outside the min/max range
supported by the hardware.

> Is something wrong with how min/max have that +1/-1 there or what?

-- 
Thanks.
-- Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ