From: Ryan Mallon <rmallon@gmail.com>
To: shuahkhan@gmail.com
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: simple_strtoull() - FIXME?
Date: Tue, 13 Mar 2012 10:19:45 +1100 [thread overview]
Message-ID: <4F5E8491.70403@gmail.com> (raw)
In-Reply-To: <1331569011.4386.15.camel@lorien2>
On 13/03/12 03:16, Shuah Khan wrote:
> What's this FIXME in simple_strtoull() for? Something to be terribly
> concerned about and need fixing (assuming there is something that still
> needs fixing)
>
> unsigned long long simple_strtoull(const char *cp, char **endp, unsigned
> int base)
> {
> unsigned long long result;
> unsigned int rv;
>
> cp = _parse_integer_fixup_radix(cp, &base);
> rv = _parse_integer(cp, base, &result);
> /* FIXME */
git blame/show answers your question. From the commit message of
1dff46d6: lib/kstrtox: common code between kstrto*() and simple_strto*()
functions:
simple_strtoull() (and scanf(), BTW) ignores integer overflow, that's a
bug we currently don't have guts to fix, making KSTRTOX_OVERFLOW hack
necessary.
Note that simple_strtoull and friends are now deprecated (see
include/linux/kernel.h) and you should now be using the kstrto*
functions instead.
~Ryan
prev parent reply other threads:[~2012-03-12 23:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 16:16 simple_strtoull() - FIXME? Shuah Khan
2012-03-12 23:19 ` Ryan Mallon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5E8491.70403@gmail.com \
--to=rmallon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shuahkhan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox