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:	Sat, 4 Jul 2015 09:16:04 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	David Cohen <david.a.cohen@...ux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Alan Cox <alan@...ux.intel.com>,
	"Stuart R. Anderson" <stuart.r.anderson@...el.com>
Subject: Re: [RFC][PATCH] x86: Allow early_printk to use console style param
 like 115200n8

On Sat, 4 Jul 2015 13:03:59 +0200
Ingo Molnar <mingo@...nel.org> wrote:

> So why not revert to the known-working simple_strtoul()? I don't see this as an 
> improvement:
> 
> > +		/*
> > +		 * In case the input is like console with text after the baud
> > +		 * rate. e.g. 115200n8. kstrtoul() will error on such input.
> > +		 */
> > +		for (p = s; *p && isdigit(*p); p++)
> > +			;
> > +		*p = 0;
> > +
> >  		if (kstrtoul(s, 0, &baud) < 0 || baud == 0)
> >  			baud = DEFAULT_BAUD;
> 
> 
> Over the old:
> 
> 		baud = simple_strtoul(s, &e, 0);
> 

That was what I actually did first, but then saw this:

 * Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing error.
 * Used as a replacement for the obsolete simple_strtoull. Return code must
 * be checked.

in lib/kstrtox.c and thought that it seems that we are trying to phase
out that function. Personally, I prefer keeping it for instances like
this.

So by all means, put back the simple_strtoul(); I would like that too.

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