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]
Message-ID: <CAD=FV=WqDpBj5YeQ6G+QeBbxwNDsn7HMAZJA297ATc26FTA_=A@mail.gmail.com>
Date:   Mon, 14 Sep 2020 16:13:56 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Daniel Thompson <daniel.thompson@...aro.org>
Cc:     Jason Wessel <jason.wessel@...driver.com>,
        kgdb-bugreport@...ts.sourceforge.net,
        LKML <linux-kernel@...r.kernel.org>,
        Patch Tracking <patches@...aro.org>
Subject: Re: [PATCH] kdb: Fix pager search for multi-line strings

Hi,

On Wed, Sep 9, 2020 at 7:18 AM Daniel Thompson
<daniel.thompson@...aro.org> wrote:
>
> Currently using forward search doesn't handle multi-line strings correctly.
> The search routine replaces line breaks with \0 during the search and, for
> regular searches ("help | grep Common\n"), there is code after the line
> has been discarded or printed to replace the break character.
>
> However during a pager search ("help\n" followed by "/Common\n") when the
> string is matched we will immediately return to normal output and the code
> that should restore the \n becomes unreachable. Fix this by restoring the
> replaced character when we disable the search mode and update the comment
> acordingly.
>
> Fixes: fb6daa7520f9d ("kdb: Provide forward search at more prompt")
> Signed-off-by: Daniel Thompson <daniel.thompson@...aro.org>
> ---
>
> Notes:
>     In the long term the kdb pager code would probably benefit from a
>     bigger rewrite since the way it handles newlines is still quirky
>     and confusing. However this fix is easy to backport so I decided
>     not to hold it back whilst we wait for code that is not yet
>     written.
>
>  kernel/debug/kdb/kdb_io.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Wow, more kdb functionality that I never knew anything about!  Seems
like a reasonable fix to me even if I agree that the code could use a
bigger cleanup.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ