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: <20170221135412.il6yrkrxt6xl7xyw@var.youpi.perso.aquilenet.fr>
Date:   Tue, 21 Feb 2017 14:54:12 +0100
From:   Samuel Thibault <samuel.thibault@...-lyon.org>
To:     "Pranay Kr. Srivastava" <pranjas@...il.com>
Cc:     w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
        gregkh@...uxfoundation.org, sfr@...b.auug.org.au,
        speakup@...ux-speakup.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH Speakup v2] return same error value from spk_set_key_info

Pranay Kr. Srivastava, on mar. 21 févr. 2017 19:14:38 +0530, wrote:
> +	if (key_data_len + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) {
> +		pr_debug("key_data_len = %d, SHIFT_TBL_SIZE + 4 = %d,\t"
> +			 "sizeof(spk_key_buf) = %lu\n", key_data_len,
> +			 SHIFT_TBL_SIZE + 4, sizeof(spk_key_buf));

Well, that's very technical, and not useful to an actual user :)
Rather print
			"too many key infos (%d bytes over %d)",
			key_data_len + SHIFT_TBL_SIZE + 4,
			sizeof(spk_key_buf)

> +		if (ch >= SHIFT_TBL_SIZE) {
> +			pr_debug("ch = %d, SHIFT_TBL_SIZE = %d\n", ch,
> +				 SHIFT_TBL_SIZE);

similarly, rather
			"ch %d is not a valid shift state (maximum %d)", ch, SHIFT_TBL_SIZE

> +		if (ch >= MAX_KEY) {
> +			pr_debug("ch = %d, MAX_KEY = %d\n", ch, MAX_KEY);

and
			"ch %d is not a valid keycode (maximum %d)", ch, MAX_KEY

Samuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ