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: <CAHp75VdMAMQ21xT-WBQUYA4G-fcUG+fTm8oGo4i4PgOWJ8-_vg@mail.gmail.com>
Date: Fri, 29 Aug 2025 16:24:53 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: David Lechner <dlechner@...libre.com>, Jonathan Cameron <jic23@...nel.org>, 
	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 Fri, Aug 29, 2025 at 12:48 PM Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> On Tue, 22 Jul 2025 at 22:55, David Lechner <dlechner@...libre.com> wrote:

...

> > +       struct {
> > +               u16 data;
> > +               aligned_s64 ts;
> > +       } scan = { };
>
> This still looks rather obfuse to me: you rely on the implicit
> presence of a 6-byte hole between data and ts, and on the implicit
> 64-bit alignment of data.
>
> What about making this explicit?

It's problematic as it's non-uniform. In each driver the author should
carefully think about this and it appears that many just made the same
mistake(s) over and over. The proposed fix doesn't rely on the actual
type and members before ts. That said, NAK to your proposal and ACK
for the original patch.

\>     struct {
>             u16 data;
>             u16 unused[3];
>             s64 ts;
>     } __aligned(8) scan = { };


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ