Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-03 Thread Jean Delvare
On Fri, 2 Jun 2017 21:45:37 +0300, Andy Shevchenko wrote: > On Fri, Jun 2, 2017 at 9:40 PM, Jean Delvare wrote: > > On Thu, 1 Jun 2017 19:06:36 +0300, Andy Shevchenko wrote: > >> Your commit message should answer to the question why and what. > >> You didn't put it there. > >>

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-03 Thread Jean Delvare
On Fri, 2 Jun 2017 21:45:37 +0300, Andy Shevchenko wrote: > On Fri, Jun 2, 2017 at 9:40 PM, Jean Delvare wrote: > > On Thu, 1 Jun 2017 19:06:36 +0300, Andy Shevchenko wrote: > >> Your commit message should answer to the question why and what. > >> You didn't put it there. > >> Moreover, the

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-02 Thread Andy Shevchenko
On Fri, Jun 2, 2017 at 9:40 PM, Jean Delvare wrote: > On Thu, 1 Jun 2017 19:06:36 +0300, Andy Shevchenko wrote: >> On Thu, Jun 1, 2017 at 5:40 PM, Jean Delvare wrote: >> > On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: >> >> On Thu, Jun 1, 2017 at

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-02 Thread Andy Shevchenko
On Fri, Jun 2, 2017 at 9:40 PM, Jean Delvare wrote: > On Thu, 1 Jun 2017 19:06:36 +0300, Andy Shevchenko wrote: >> On Thu, Jun 1, 2017 at 5:40 PM, Jean Delvare wrote: >> > On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: >> >> On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: >> >>

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-02 Thread Jean Delvare
On Thu, 1 Jun 2017 19:06:36 +0300, Andy Shevchenko wrote: > On Thu, Jun 1, 2017 at 5:40 PM, Jean Delvare wrote: > > On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: > >> On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: > > >> > - const

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-02 Thread Jean Delvare
On Thu, 1 Jun 2017 19:06:36 +0300, Andy Shevchenko wrote: > On Thu, Jun 1, 2017 at 5:40 PM, Jean Delvare wrote: > > On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: > >> On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: > > >> > - const u8 *d = (u8 *) dm + index; > >> > +

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Andy Shevchenko
On Thu, Jun 1, 2017 at 5:40 PM, Jean Delvare wrote: > On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: >> On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: >> > - const u8 *d = (u8 *) dm + index; >> > + const u8 *d; >> >> > + d =

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Andy Shevchenko
On Thu, Jun 1, 2017 at 5:40 PM, Jean Delvare wrote: > On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: >> On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: >> > - const u8 *d = (u8 *) dm + index; >> > + const u8 *d; >> >> > + d = (u8 *) dm + index; >> >> I think you

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Jean Delvare
Hi Andy, Thanks for the review. On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: > On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: > > Before accessing DMI data to record it for later, we should ensure > > that the DMI structures are large enough to contain the

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Jean Delvare
Hi Andy, Thanks for the review. On Thu, 1 Jun 2017 16:16:05 +0300, Andy Shevchenko wrote: > On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: > > Before accessing DMI data to record it for later, we should ensure > > that the DMI structures are large enough to contain the data in > >

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Mika Westerberg
On Thu, Jun 01, 2017 at 03:08:39PM +0200, Jean Delvare wrote: > Before accessing DMI data to record it for later, we should ensure > that the DMI structures are large enough to contain the data in > question. > > Signed-off-by: Jean Delvare > Cc: Dmitry Torokhov

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Mika Westerberg
On Thu, Jun 01, 2017 at 03:08:39PM +0200, Jean Delvare wrote: > Before accessing DMI data to record it for later, we should ensure > that the DMI structures are large enough to contain the data in > question. > > Signed-off-by: Jean Delvare > Cc: Dmitry Torokhov > Cc: Mika Westerberg Thanks

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Andy Shevchenko
On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: > Before accessing DMI data to record it for later, we should ensure > that the DMI structures are large enough to contain the data in > question. > - const u8 *d = (u8 *) dm + index; > + const u8 *d; > + d

Re: [PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Andy Shevchenko
On Thu, Jun 1, 2017 at 4:08 PM, Jean Delvare wrote: > Before accessing DMI data to record it for later, we should ensure > that the DMI structures are large enough to contain the data in > question. > - const u8 *d = (u8 *) dm + index; > + const u8 *d; > + d = (u8 *) dm +

[PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Jean Delvare
Before accessing DMI data to record it for later, we should ensure that the DMI structures are large enough to contain the data in question. Signed-off-by: Jean Delvare Cc: Dmitry Torokhov Cc: Mika Westerberg Cc:

[PATCH] firmware: dmi: Check DMI structure length

2017-06-01 Thread Jean Delvare
Before accessing DMI data to record it for later, we should ensure that the DMI structures are large enough to contain the data in question. Signed-off-by: Jean Delvare Cc: Dmitry Torokhov Cc: Mika Westerberg Cc: Andy Shevchenko Cc: Linus Walleij --- drivers/firmware/dmi_scan.c | 23