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: <20130306133921.62b9cc38beca2145269c0182@linux-foundation.org>
Date:	Wed, 6 Mar 2013 13:39:21 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>
Subject: Re: [PATCH] sysrq: allow user trigger sysrq by upper-case character
 key

On Wed, 6 Mar 2013 12:07:34 +0800 "zhangwei(Jovi)" <jovi.zhangwei@...wei.com> wrote:

> See the help text output of /proc/sysrq-trigger:
> 
>    SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E)
>    memory-full-oom-kill(F) kill-all-tasks(I) ...
> 
> Most command is referenced by responding upper-case character,
> this would hint user can trigger sysrq by upper-case character key,
> but that's wrong, sysrq only accept lower-case character currently.
> 
> It's reasonable to let user trigger sysrq by upper-case character key.
> 
> Signed-off-by: zhnagwei(Jovi) <jovi.zhangwei@...wei.com>
> ---
>  drivers/tty/sysrq.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index 3687f0c..a88908e 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -471,6 +471,8 @@ static int sysrq_key_table_key2index(int key)
>  		retval = key - '0';
>  	else if ((key >= 'a') && (key <= 'z'))
>  		retval = key + 10 - 'a';
> +	else if ((key >= 'A') && (key <= 'Z'))
> +		retval = key + 10 - 'A';
>  	else
>  		retval = -1;
>  	return retval;

Then fix the help message ;)

We're already using 19 of the 26 letters and this change would rule out
future use of the 26 upper-case letters.

I doubt if anyone is hurting from the inconsistent help message, really.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ