From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dongsu Park <dpark@posteo.net>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Peter Hurley <peter@hurleysoftware.com>,
Josh Triplett <josh@joshtriplett.org>,
Al Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>,
Alban Crequy <alban@endocode.com>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t
Date: Wed, 19 Aug 2015 10:34:43 +0200 [thread overview]
Message-ID: <87io8b3cd8.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <20150819004714.c06e4a70.akpm@linux-foundation.org> (Andrew Morton's message of "Wed, 19 Aug 2015 00:47:14 -0700")
On Wed, Aug 19 2015, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> whoa, wait, I was looking at the -mm tree which changes kstrtouint():
>
> static inline int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res)
> {
> return parse_integer(s, base | PARSE_INTEGER_NEWLINE, res);
> }
>
> and
>
> * Return number of characters parsed or -E.
> ...
> */
> #define parse_integer(s, base, val) \
>
>
> Alexey, doesn't this mean that code which does
>
> if (kstrtouint(...))
> return -EFOO;
>
> will break?
No, because PARSE_INTEGER_NEWLINE means more than just accepting a
trailing newline. It also requires the entire string to be consumed, and
changes the return semantics.
I suggested splitting those three things into separate flags and letting
PARSE_INTEGER_KSTRTOX be a shorthand for those.
<http://thread.gmane.org/gmane.linux.kernel/1949066/focus=1949239>
Rasmus
next prev parent reply other threads:[~2015-08-19 8:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 14:31 [PATCH] devpts: allow mounting with uid/gid of uint32_t Dongsu Park
2015-08-18 15:18 ` [PATCH v2] " Dongsu Park
2015-08-18 23:44 ` Andrew Morton
2015-08-19 7:24 ` Dongsu Park
2015-08-19 7:47 ` Andrew Morton
2015-08-19 8:34 ` Rasmus Villemoes [this message]
2015-08-19 10:47 ` Alexey Dobriyan
2015-08-28 19:33 ` Peter Hurley
2015-08-29 10:43 ` Dongsu Park
2015-08-29 21:44 ` Alexey Dobriyan
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=87io8b3cd8.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alban@endocode.com \
--cc=dhowells@redhat.com \
--cc=dpark@posteo.net \
--cc=josh@joshtriplett.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.