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: <CAD=FV=WC-ce14rgrYsVbg75dNX5tL6Saj5T8YqpAWm2ndLGdXA@mail.gmail.com>
Date: Thu, 31 Oct 2024 16:06:03 -0700
From: Doug Anderson <dianders@...omium.org>
To: Nir Lichtman <nir@...htman.org>
Cc: jason.wessel@...driver.com, daniel.thompson@...aro.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kdb: Fix incorrect naming of history arrow keys in code

Hi,

On Thu, Oct 31, 2024 at 12:23 PM Nir Lichtman <nir@...htman.org> wrote:
>
> Problem: The kdb CLI code that handles the history up and down
> navigation incorrectly names the up and down arrows as ctrl p and n.
>
> Details: This could be some kind of left over legacy.
> (maybe inspired by ddb which only reacts to ctrl p and n for history nav).
> kdb doesn't react to ctrl p and n, and following the code flow with GDB
> reveals that these values map to the up and down arrows.

Really? kdb reacts to "ctrl-P" and "ctrl-N" for me. It also reacts to
"ctrl-F" and "ctrl-B".

I think the code as-is is fine. The arrow key code just converts to
the arrow keys to the (also working) ctrl keys and by the time we're
here we just need to react to Ctrl keys. Ctrl keys are 64 less than
non-ctrl keys and so the definitions of Ctrl-N and Ctrl-P are correct:

>>> ord('N') - 64
14

>>> ord('P') - 64
16

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ