Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-06 Thread Borislav Petkov
On Wed, Jan 06, 2016 at 09:57:08AM -0800, Dave Hansen wrote: > So, after the third patch, the strlen() goes away any way you do this. > The code ends up looking the same (the while() check is against the > max-length variable alone). True story. > I'm happy to rewrite this to have a different

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-06 Thread Dave Hansen
Moving over to the actual patch we're talking about... On 12/22/2015 02:52 PM, Dave Hansen wrote: > @@ -37,11 +39,14 @@ int cmdline_find_option_bool(const char > if (!cmdline) > return -1; /* No command line */ > > - len = min_t(int, strlen(cmdline),

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-06 Thread Borislav Petkov
On Tue, Dec 22, 2015 at 02:52:38PM -0800, Dave Hansen wrote: > > From: Dave Hansen > > The x86 early command line parsing in cmdline_find_option_bool() > is buggy. If it matches a specified 'option' all the way to > the end of the command-line, it will consider it a match. > > For instance, >

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-06 Thread Dave Hansen
Moving over to the actual patch we're talking about... On 12/22/2015 02:52 PM, Dave Hansen wrote: > @@ -37,11 +39,14 @@ int cmdline_find_option_bool(const char > if (!cmdline) > return -1; /* No command line */ > > - len = min_t(int, strlen(cmdline),

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-06 Thread Borislav Petkov
On Wed, Jan 06, 2016 at 09:57:08AM -0800, Dave Hansen wrote: > So, after the third patch, the strlen() goes away any way you do this. > The code ends up looking the same (the while() check is against the > max-length variable alone). True story. > I'm happy to rewrite this to have a different

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-06 Thread Borislav Petkov
On Tue, Dec 22, 2015 at 02:52:38PM -0800, Dave Hansen wrote: > > From: Dave Hansen > > The x86 early command line parsing in cmdline_find_option_bool() > is buggy. If it matches a specified 'option' all the way to > the end of the command-line, it will consider it

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-05 Thread Dave Hansen
On 01/05/2016 10:35 AM, Borislav Petkov wrote: > On Tue, Dec 22, 2015 at 02:52:38PM -0800, Dave Hansen wrote: >> From: Dave Hansen >> The x86 early command line parsing in cmdline_find_option_bool() >> is buggy. If it matches a specified 'option' all the way to >> the end of the command-line, it

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-05 Thread Borislav Petkov
On Tue, Dec 22, 2015 at 02:52:38PM -0800, Dave Hansen wrote: > > From: Dave Hansen > > The x86 early command line parsing in cmdline_find_option_bool() > is buggy. If it matches a specified 'option' all the way to > the end of the command-line, it will consider it a match. > > For instance, >

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-05 Thread Dave Hansen
On 01/05/2016 10:35 AM, Borislav Petkov wrote: > On Tue, Dec 22, 2015 at 02:52:38PM -0800, Dave Hansen wrote: >> From: Dave Hansen >> The x86 early command line parsing in cmdline_find_option_bool() >> is buggy. If it matches a specified 'option' all the way to >>

Re: [PATCH 1/5] x86: fix early command-line parsing when matching at end

2016-01-05 Thread Borislav Petkov
On Tue, Dec 22, 2015 at 02:52:38PM -0800, Dave Hansen wrote: > > From: Dave Hansen > > The x86 early command line parsing in cmdline_find_option_bool() > is buggy. If it matches a specified 'option' all the way to > the end of the command-line, it will consider it

[PATCH 1/5] x86: fix early command-line parsing when matching at end

2015-12-22 Thread Dave Hansen
From: Dave Hansen The x86 early command line parsing in cmdline_find_option_bool() is buggy. If it matches a specified 'option' all the way to the end of the command-line, it will consider it a match. For instance, cmdline = "foo"; cmdline_find_option_bool(cmdline, "fool");

[PATCH 1/5] x86: fix early command-line parsing when matching at end

2015-12-22 Thread Dave Hansen
From: Dave Hansen The x86 early command line parsing in cmdline_find_option_bool() is buggy. If it matches a specified 'option' all the way to the end of the command-line, it will consider it a match. For instance, cmdline = "foo";