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-next>] [day] [month] [year] [list]
Message-ID: <20190223194219.qxvi7cwfp3etqdfi@function>
Date:   Sat, 23 Feb 2019 20:42:19 +0100
From:   Samuel Thibault <samuel.thibault@...-lyon.org>
To:     w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
        gregkh@...uxfoundation.org, speakup@...ux-speakup.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: Note that simple_strtoul can't simply be replaced
 by kstrtoul

We often receive patches which erroneously try to use kstrtoul in these
places.

Signed-off-by: Samuel Thibault <samuel.thibault@...-lyon.org>
---
 drivers/staging/speakup/kobjects.c    |    2 ++
 drivers/staging/speakup/main.c        |    1 +
 drivers/staging/speakup/varhandlers.c |    1 +
 3 files changed, 4 insertions(+)

--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -154,6 +154,7 @@ static ssize_t chars_chartab_store(struc
 			continue;
 		}
 
+		/* Do not replace with kstrtoul: here we need temp to be updated */
 		index = simple_strtoul(cp, &temp, 10);
 		if (index > 255) {
 			rejected++;
@@ -787,6 +788,7 @@ static ssize_t message_store_helper(cons
 			continue;
 		}
 
+		/* Do not replace with kstrtoul: here we need temp to be updated */
 		index = simple_strtoul(cp, &temp, 10);
 
 		while ((temp < linefeed) && (*temp == ' ' || *temp == '\t'))
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -1979,6 +1979,7 @@ oops:
 		return 1;
 	}
 
+	/* Do not replace with kstrtoul: here we need cp to be updated */
 	goto_pos = simple_strtoul(goto_buf, &cp, 10);
 
 	if (*cp == 'x') {
--- a/drivers/staging/speakup/varhandlers.c
+++ b/drivers/staging/speakup/varhandlers.c
@@ -328,6 +328,7 @@ char *spk_s2uchar(char *start, char *des
 {
 	int val;
 
+	/* Do not replace with kstrtoul: here we need start to be updated */
 	val = simple_strtoul(skip_spaces(start), &start, 10);
 	if (*start == ',')
 		start++;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ