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] [day] [month] [year] [list]
Message-ID: <57fa4ea0-36eb-4e1d-981d-7b2a1178c84b@baylibre.com>
Date: Fri, 5 Sep 2025 14:29:31 -0500
From: David Lechner <dlechner@...libre.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Nuno Sá <nuno.sa@...log.com>,
 Andy Shevchenko <andy@...nel.org>, Mathieu Othacehe <othacehe@....org>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v2] iio: proximity: isl29501: fix buffered read on
 big-endian systems

On 7/24/25 6:03 AM, Jonathan Cameron wrote:
> On Tue, 22 Jul 2025 15:54:21 -0500
> David Lechner <dlechner@...libre.com> wrote:
> 
>> Fix passing a u32 value as a u16 buffer scan item. This works on little-
>> endian systems, but not on big-endian systems.
>>
>> A new local variable is introduced for getting the register value and
>> the array is changed to a struct to make the data layout more explicit
>> rather than just changing the type and having to recalculate the proper
>> length needed for the timestamp.
>>
>> Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.")
>> Signed-off-by: David Lechner <dlechner@...libre.com>
> ok. This probably is the best minimal fix but there is a bunch of other type
> confusion around this in the driver (not as far as I can see actual bugs though).
> 
> Might be good to circle back and make the val parameter of isl29501_register_read()
> a u16 as a follow up.

There are a lot of places where *val from isl29501_read_raw() is being passed
straight through to isl29501_register_read(), so we would have to add more
temporary variables to handle this. Not sure if it is worth it.

> 
> Applied to my temporary fixes-togreg-for-6.17 branch on iio.git and marked
> for stable.
> 
> Thanks,
> 
> Jonathan
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ