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]
Message-ID: <CAD=FV=URj6UiZgH_g3twcYgv=USGr7YUV5SkW3J-WYR1vs+MDw@mail.gmail.com>
Date:   Thu, 4 Jun 2020 14:12:22 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Sumit Garg <sumit.garg@...aro.org>
Cc:     Daniel Thompson <daniel.thompson@...aro.org>,
        kgdb-bugreport@...ts.sourceforge.net,
        Jason Wessel <jason.wessel@...driver.com>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 4/4] kdb: Switch to use safer dbg_io_ops over console APIs

Hi,

On Thu, Jun 4, 2020 at 3:02 AM Sumit Garg <sumit.garg@...aro.org> wrote:
>
> @@ -433,7 +432,8 @@ static int kgdboc_earlycon_get_char(void)
>  {
>         char c;
>
> -       if (!earlycon->read(earlycon, &c, 1))
> +       if (!kgdboc_earlycon_io_ops.cons->read(kgdboc_earlycon_io_ops.cons,
> +                                              &c, 1))
>                 return NO_POLL_CHAR;
>
>         return c;
> @@ -441,7 +441,8 @@ static int kgdboc_earlycon_get_char(void)
>
>  static void kgdboc_earlycon_put_char(u8 chr)
>  {
> -       earlycon->write(earlycon, &chr, 1);
> +       kgdboc_earlycon_io_ops.cons->write(kgdboc_earlycon_io_ops.cons, &chr,
> +                                          1);
>  }

The get_char / put_char functions are pretty unwieldy now.  If it were
me I would have done:

struct console *con =  kgdboc_earlycon_io_ops.cons;

...and then used it so the lines didn't wrap in such a terrible way.  ;-)

I'm not sure if I'd spin just for that, though.

Reviewed-by: Douglas Anderson <dianders@...omium.org>

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ