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]
Date:	Wed, 9 Sep 2009 01:06:25 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jean Delvare <khali@...ux-fr.org>
Cc:	tomaz.mertelj@...st.arnes.si, linux-kernel@...r.kernel.org,
	lm-sensors@...sensors.org
Subject: Re: [lm-sensors] [PATCH] hwmon: Driver for Texas Instruments 
 amc6821 chip

On Wed, 9 Sep 2009 09:34:35 +0200 Jean Delvare <khali@...ux-fr.org> wrote:

> > Also, the checkpatch warning
> > 
> > WARNING: consider using strict_strtol in preference to simple_strtol
> > #381: FILE: drivers/hwmon/amc6821.c:228:
> > +       int val = simple_strtol(buf, NULL, 10); \
> > 
> > is valid.  The problem with simple_strtol() is that it will treat input
> > of the form "43foo" as "43".  Even though the input was invalid.  A
> > minor thing, but easily fixed too.
> 
> Is there any legitimate use of simple_strtol then?

Probably not, unless it's known that the input is a legit decimal
string.

> I'm wondering why we
> don't just get rid of it and rename strict_strtol to just strtol.

Well.  The calling convention is pretty different, the callers need to
be changed to handle errors.  But the main problem is that changing
existing interfaces to use strict_strtol() could break existing
userspace.


--
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