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] [day] [month] [year] [list]
Date:   Thu, 24 Nov 2022 13:10:10 +0100
From:   Ricardo Ribalda <ribalda@...omium.org>
To:     Jiri Slaby <jirislaby@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] earlycon: Let users set the clock frequency

On Thu, 24 Nov 2022 at 12:19, Jiri Slaby <jirislaby@...nel.org> wrote:
>
> Hi,
>
> On 24. 11. 22, 11:02, Ricardo Ribalda wrote:
> ...
> > --- a/drivers/tty/serial/earlycon.c
> > +++ b/drivers/tty/serial/earlycon.c
> > @@ -120,9 +120,15 @@ static int __init parse_options(struct earlycon_device *device, char *options)
> >       }
> >
> >       if (options) {
> > +             char *uartclk;
> > +
> >               if (kstrtouint(options, 0, &device->baud) < 0)
> >                       pr_warn("[%s] unsupported earlycon baud rate option\n",
> >                               options);
>
> IMO this won't work if there is a comma in options (i.e. your new
> clkrate param). kstrtouint will return -EINVAL in that case.
>
> > +             uartclk = strchr(options, ',');
> > +             if (uartclk && kstrtouint(uartclk, 0, &port->uartclk) < 0)
>
> You are giving ",number" to kstrtouint, right? That won't work either ;).


The fun thing is that it worked because it fell back to the acpi
parameters :). Will send a v3

Thanks!
>
> regards,
> --
> js
>


-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ