[PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting

Matti Vaittinen posted 2 patches 1 year, 7 months ago
drivers/iio/industrialio-gts-helper.c | 7 +++++--
drivers/iio/test/iio-test-gts.c       | 8 +++++---
2 files changed, 10 insertions(+), 5 deletions(-)
[PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Matti Vaittinen 1 year, 7 months ago
Fix the available times table sorting in iio-gts-helpers

This series contains a fix and test for the sorting of the available times in
IIO-gts helpers. Fix was originally developed and posted by Chenyuan Yang.

Revision history:
	v1 => v2:
	  - Fix the sender for patch 1/2 (Sic!)
	  - Fix Co-Developed-by tag (drop this from Chenyuan who
	    is the original author)
	  - Fix the From: tag as instructed in:
	    https://www.kernel.org/doc/html/latest/process/submitting-patches.html

---

Chenyuan Yang (1):
  iio: Fix the sorting functionality in iio_gts_build_avail_time_table

Matti Vaittinen (1):
  iio: test: gts: test available times and gains sorting


Chenyuan Yang (1):
  iio: Fix the sorting functionality in iio_gts_build_avail_time_table

Matti Vaittinen (1):
  iio: test: gts: test available times and gains sorting

 drivers/iio/industrialio-gts-helper.c | 7 +++++--
 drivers/iio/test/iio-test-gts.c       | 8 +++++---
 2 files changed, 10 insertions(+), 5 deletions(-)


base-commit: 4cece764965020c22cff7665b18a012006359095
-- 
2.44.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 
Re: [PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Jonathan Cameron 1 year, 7 months ago
On Tue, 30 Apr 2024 15:44:26 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> Fix the available times table sorting in iio-gts-helpers
> 
> This series contains a fix and test for the sorting of the available times in
> IIO-gts helpers. Fix was originally developed and posted by Chenyuan Yang.
> 
> Revision history:
> 	v1 => v2:
> 	  - Fix the sender for patch 1/2 (Sic!)
> 	  - Fix Co-Developed-by tag (drop this from Chenyuan who
> 	    is the original author)
> 	  - Fix the From: tag as instructed in:
> 	    https://www.kernel.org/doc/html/latest/process/submitting-patches.html

Am I right in thinking this doesn't matter for existing drivers?
As such not high priority for back porting?

I'll assume that and queue it up for 6.11. If someone shouts I can pull the fix
forwards, but then we have the mess of chasing the testing in later.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day
to poke at it.

Thanks,

Jonathan

> 
> ---
> 
> Chenyuan Yang (1):
>   iio: Fix the sorting functionality in iio_gts_build_avail_time_table
> 
> Matti Vaittinen (1):
>   iio: test: gts: test available times and gains sorting
> 
> 
> Chenyuan Yang (1):
>   iio: Fix the sorting functionality in iio_gts_build_avail_time_table
> 
> Matti Vaittinen (1):
>   iio: test: gts: test available times and gains sorting
> 
>  drivers/iio/industrialio-gts-helper.c | 7 +++++--
>  drivers/iio/test/iio-test-gts.c       | 8 +++++---
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> 
> base-commit: 4cece764965020c22cff7665b18a012006359095
Re: [PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Matti Vaittinen 1 year, 7 months ago
On 5/5/24 20:50, Jonathan Cameron wrote:
> On Tue, 30 Apr 2024 15:44:26 +0300
> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> 
>> Fix the available times table sorting in iio-gts-helpers
>>
>> This series contains a fix and test for the sorting of the available times in
>> IIO-gts helpers. Fix was originally developed and posted by Chenyuan Yang.
>>
>> Revision history:
>> 	v1 => v2:
>> 	  - Fix the sender for patch 1/2 (Sic!)
>> 	  - Fix Co-Developed-by tag (drop this from Chenyuan who
>> 	    is the original author)
>> 	  - Fix the From: tag as instructed in:
>> 	    https://www.kernel.org/doc/html/latest/process/submitting-patches.html
> 
> Am I right in thinking this doesn't matter for existing drivers?

I think this is right. Only couple of in-tree drivers are using these 
helpers for now, and all of them sorted the tables already in driver.

> As such not high priority for back porting?

The bug is pretty nasty as it causes invalid memory accesses. Hence I'd 
like to see this landing in the longterm kernels. It seems to me the GTS 
helpers got merged in 6.4, so getting the fix backported to 6.6 might 
make sense.

> I'll assume that and queue it up for 6.11. If someone shouts I can pull the fix
> forwards, but then we have the mess of chasing the testing in later.

I am sorry Jonathan but I'm not quite sure what you mean by "pulling fix 
forward", or what is the "mess of chasing the testing in later" :)

> Applied to the togreg branch of iio.git and pushed out as testing for 0-day
> to poke at it.

Thanks! Appreciate your work as always!

Yours,
	-- Matti

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~
Re: [PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Jonathan Cameron 1 year, 7 months ago
On Mon, 6 May 2024 08:09:27 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> On 5/5/24 20:50, Jonathan Cameron wrote:
> > On Tue, 30 Apr 2024 15:44:26 +0300
> > Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> >   
> >> Fix the available times table sorting in iio-gts-helpers
> >>
> >> This series contains a fix and test for the sorting of the available times in
> >> IIO-gts helpers. Fix was originally developed and posted by Chenyuan Yang.
> >>
> >> Revision history:
> >> 	v1 => v2:
> >> 	  - Fix the sender for patch 1/2 (Sic!)
> >> 	  - Fix Co-Developed-by tag (drop this from Chenyuan who
> >> 	    is the original author)
> >> 	  - Fix the From: tag as instructed in:
> >> 	    https://www.kernel.org/doc/html/latest/process/submitting-patches.html  
> > 
> > Am I right in thinking this doesn't matter for existing drivers?  
> 
> I think this is right. Only couple of in-tree drivers are using these 
> helpers for now, and all of them sorted the tables already in driver.
> 
> > As such not high priority for back porting?  
> 
> The bug is pretty nasty as it causes invalid memory accesses. Hence I'd 
> like to see this landing in the longterm kernels. It seems to me the GTS 
> helpers got merged in 6.4, so getting the fix backported to 6.6 might 
> make sense.
> 
> > I'll assume that and queue it up for 6.11. If someone shouts I can pull the fix
> > forwards, but then we have the mess of chasing the testing in later.  
> 
> I am sorry Jonathan but I'm not quite sure what you mean by "pulling fix 
> forward", or what is the "mess of chasing the testing in later" :)

Hmm. That was an odd choice of words :)  I just meant that I could send
the fix in the first set of fixes after 6.10-rc1 rather than waiting for 6.11.

For now I'll leave it queued for 6.11 on the basis there are a lot of ways
a driver writer can cause similar out of bounds accesses and they should
notice it not working during testing.  So it 'should' not be a problem to
not rush this in.

J
> 
> > Applied to the togreg branch of iio.git and pushed out as testing for 0-day
> > to poke at it.  
> 
> Thanks! Appreciate your work as always!
> 
> Yours,
> 	-- Matti
>
Re: [PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Matti Vaittinen 1 year, 7 months ago
On 5/6/24 15:53, Jonathan Cameron wrote:
> On Mon, 6 May 2024 08:09:27 +0300
> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> 
>> On 5/5/24 20:50, Jonathan Cameron wrote:
>>> On Tue, 30 Apr 2024 15:44:26 +0300
>>> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
>>>    
>>>> Fix the available times table sorting in iio-gts-helpers
>>>>
>>>> This series contains a fix and test for the sorting of the available times in
>>>> IIO-gts helpers. Fix was originally developed and posted by Chenyuan Yang.
>>>>
>>>> Revision history:
>>>> 	v1 => v2:
>>>> 	  - Fix the sender for patch 1/2 (Sic!)
>>>> 	  - Fix Co-Developed-by tag (drop this from Chenyuan who
>>>> 	    is the original author)
>>>> 	  - Fix the From: tag as instructed in:
>>>> 	    https://www.kernel.org/doc/html/latest/process/submitting-patches.html
>>>
>>> Am I right in thinking this doesn't matter for existing drivers?
>>
>> I think this is right. Only couple of in-tree drivers are using these
>> helpers for now, and all of them sorted the tables already in driver.
>>
>>> As such not high priority for back porting?
>>
>> The bug is pretty nasty as it causes invalid memory accesses. Hence I'd
>> like to see this landing in the longterm kernels. It seems to me the GTS
>> helpers got merged in 6.4, so getting the fix backported to 6.6 might
>> make sense.
>>
>>> I'll assume that and queue it up for 6.11. If someone shouts I can pull the fix
>>> forwards, but then we have the mess of chasing the testing in later.
>>
>> I am sorry Jonathan but I'm not quite sure what you mean by "pulling fix
>> forward", or what is the "mess of chasing the testing in later" :)
> 
> Hmm. That was an odd choice of words :)  I just meant that I could send
> the fix in the first set of fixes after 6.10-rc1 rather than waiting for 6.11.

Oh, right :)

> For now I'll leave it queued for 6.11 on the basis there are a lot of ways
> a driver writer can cause similar out of bounds accesses and they should
> notice it not working during testing.  So it 'should' not be a problem to
> not rush this in.
> 

I guess this means the 6.10 won't have the fix? I believe this is fine - 
assuming the 6.10 is not going to be an LTS. Thanks for taking care of 
this! :)

Yours,
	-- Matti


-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~
Re: [PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Jonathan Cameron 1 year, 7 months ago
On Tue, 7 May 2024 09:14:15 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> On 5/6/24 15:53, Jonathan Cameron wrote:
> > On Mon, 6 May 2024 08:09:27 +0300
> > Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> >   
> >> On 5/5/24 20:50, Jonathan Cameron wrote:  
> >>> On Tue, 30 Apr 2024 15:44:26 +0300
> >>> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> >>>      
> >>>> Fix the available times table sorting in iio-gts-helpers
> >>>>
> >>>> This series contains a fix and test for the sorting of the available times in
> >>>> IIO-gts helpers. Fix was originally developed and posted by Chenyuan Yang.
> >>>>
> >>>> Revision history:
> >>>> 	v1 => v2:
> >>>> 	  - Fix the sender for patch 1/2 (Sic!)
> >>>> 	  - Fix Co-Developed-by tag (drop this from Chenyuan who
> >>>> 	    is the original author)
> >>>> 	  - Fix the From: tag as instructed in:
> >>>> 	    https://www.kernel.org/doc/html/latest/process/submitting-patches.html  
> >>>
> >>> Am I right in thinking this doesn't matter for existing drivers?  
> >>
> >> I think this is right. Only couple of in-tree drivers are using these
> >> helpers for now, and all of them sorted the tables already in driver.
> >>  
> >>> As such not high priority for back porting?  
> >>
> >> The bug is pretty nasty as it causes invalid memory accesses. Hence I'd
> >> like to see this landing in the longterm kernels. It seems to me the GTS
> >> helpers got merged in 6.4, so getting the fix backported to 6.6 might
> >> make sense.
> >>  
> >>> I'll assume that and queue it up for 6.11. If someone shouts I can pull the fix
> >>> forwards, but then we have the mess of chasing the testing in later.  
> >>
> >> I am sorry Jonathan but I'm not quite sure what you mean by "pulling fix
> >> forward", or what is the "mess of chasing the testing in later" :)  
> > 
> > Hmm. That was an odd choice of words :)  I just meant that I could send
> > the fix in the first set of fixes after 6.10-rc1 rather than waiting for 6.11.  
> 
> Oh, right :)
> 
> > For now I'll leave it queued for 6.11 on the basis there are a lot of ways
> > a driver writer can cause similar out of bounds accesses and they should
> > notice it not working during testing.  So it 'should' not be a problem to
> > not rush this in.
> >   
> 
> I guess this means the 6.10 won't have the fix? I believe this is fine - 
> assuming the 6.10 is not going to be an LTS. Thanks for taking care of 
> this! :)
It may well get backported anyway, but after 6.11 merge window.

J
> 
> Yours,
> 	-- Matti
> 
>
Re: [PATCH v2 0/2] Fix the iio-gts-helpers available times table sorting
Posted by Matti Vaittinen 1 year, 7 months ago
On 5/9/24 15:15, Jonathan Cameron wrote:
> On Tue, 7 May 2024 09:14:15 +0300
> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
>> On 5/6/24 15:53, Jonathan Cameron wrote:
>>> On Mon, 6 May 2024 08:09:27 +0300
>>> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
>>>> On 5/5/24 20:50, Jonathan Cameron wrote:
>>>>> On Tue, 30 Apr 2024 15:44:26 +0300
>>>>> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
>>>>>        >>> For now I'll leave it queued for 6.11 on the basis there are a lot 
of ways
>>> a driver writer can cause similar out of bounds accesses and they should
>>> notice it not working during testing.  So it 'should' not be a problem to
>>> not rush this in.
>>>    
>>
>> I guess this means the 6.10 won't have the fix? I believe this is fine -
>> assuming the 6.10 is not going to be an LTS. Thanks for taking care of
>> this! :)
> It may well get backported anyway, but after 6.11 merge window.

This sounds good. Thanks for clarifying!

Yours,
	-- Matti

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~