mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Andy Shevchenko' <andriy.shevchenko@linux.intel.com>,
	Petr Mladek <pmladek@suse.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mans Rullgard <mans@mansr.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 2/2] auxdisplay: charlcd: Deduplicate simple_strtoul()
Date: Mon, 8 Jul 2019 13:42:30 +0000	[thread overview]
Message-ID: <17f403303bfc4f6b90573858ae966cb7@AcuMS.aculab.com> (raw)
In-Reply-To: <20190708133534.GO9224@smile.fi.intel.com>

> > simple_strtoul() tries to detect the base even when it has been
> > explicitely specified.
> 
> I can't see it from the code. Can you point out to this drastic bug that has to
> be fixed?
> 
> > I am afraid that it might cause some
> > regressions.
> >
> > For example, the following input is strange but it is valid:
> >
> >     x0x10;  new code would return (16, <orig_y>) instead of (10, <orig_y>)
> >     x010;   new code would return (8, <orig_y>) instead of (10, <orig_y>)

While having simple_stroul("0x10", 10) use base 16 is possibly not unreasonable,
using base 8 for simple_strtoul("010", 10) is just plain wrong.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2019-07-08 13:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 11:55 [PATCH v3 1/2] kernel.h: Update comment about simple_strto<foo>() functions Andy Shevchenko
2019-07-04 11:55 ` [PATCH v3 2/2] auxdisplay: charlcd: Deduplicate simple_strtoul() Andy Shevchenko
2019-07-08 13:16   ` Petr Mladek
2019-07-08 13:35     ` Andy Shevchenko
2019-07-08 13:42       ` David Laight [this message]
2019-07-08 13:56       ` Petr Mladek
2019-07-08 13:01 ` [PATCH v3 1/2] kernel.h: Update comment about simple_strto<foo>() functions Petr Mladek
2019-07-08 13:13   ` Geert Uytterhoeven
2019-07-08 13:48     ` Petr Mladek

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=17f403303bfc4f6b90573858ae966cb7@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mans@mansr.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=pmladek@suse.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

all inboxes | Powered by JetHome®