Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-15 Thread Marijn Suijten
On 2021-11-15 11:23:27, Daniel Thompson wrote: > On Fri, Nov 12, 2021 at 10:43:37PM +0100, Marijn Suijten wrote: > > On 2021-11-12 13:35:03, Marijn Suijten wrote: > > > On 2021-11-12 12:08:39, Daniel Thompson wrote: > > > > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > > > >

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-15 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 10:43:37PM +0100, Marijn Suijten wrote: > On 2021-11-12 13:35:03, Marijn Suijten wrote: > > On 2021-11-12 12:08:39, Daniel Thompson wrote: > > > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > > > When not specifying num-strings in the DT the default is

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-12 Thread Marijn Suijten
On 2021-11-12 13:35:03, Marijn Suijten wrote: > On 2021-11-12 12:08:39, Daniel Thompson wrote: > > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > > When not specifying num-strings in the DT the default is used, but +1 is > > > added to it which turns WLED3 into 4 and WLED4/5

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 01:35:01PM +0100, Marijn Suijten wrote: > On 2021-11-12 12:08:39, Daniel Thompson wrote: > > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > > + if (string_len > 0) { > > > + dev_warn(dev, "qcom,num-strings and > > >

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-12 Thread Marijn Suijten
On 2021-11-12 12:08:39, Daniel Thompson wrote: > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > When not specifying num-strings in the DT the default is used, but +1 is > > added to it which turns WLED3 into 4 and WLED4/5 into 5 strings instead > > of 3 and 4 respectively,

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > When not specifying num-strings in the DT the default is used, but +1 is > added to it which turns WLED3 into 4 and WLED4/5 into 5 strings instead > of 3 and 4 respectively, causing out-of-bounds reads and register > read/writes.