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: <CAH5Ym4gTtRTAn=rn8Hb1jctcCjuMurLNXjHSA2kQLbfRSDaQnA@mail.gmail.com>
Date: Thu, 3 Oct 2024 19:19:36 -0700
From: Sam Edwards <cfsworks@...il.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: Justin Chen <justin.chen@...adcom.com>, Al Cooper <alcooperx@...il.com>, 
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, Vinod Koul <vkoul@...nel.org>, 
	Kishon Vijay Abraham I <kishon@...nel.org>, linux-kernel@...r.kernel.org, 
	linux-phy@...ts.infradead.org
Subject: Re: [PATCH] phy: usb: fix Broadcom driver table indexing error

On Thu, Oct 3, 2024 at 3:47 PM Florian Fainelli
<florian.fainelli@...adcom.com> wrote:
>
> On 10/3/24 14:17, Sam Edwards wrote:
> > The Broadcom USB PHY driver contains a lookup table
> > (`reg_bits_map_tables`) to resolve register bitmaps unique to certain
> > versions of the USB PHY as found in various Broadcom chip families.
> > Historically, this table was just kept carefully in sync with the
> > "selector" enum every time the latter changed to ensure consistency.
> > However, a recent commit (see 'fixes' tag) introduced two new
> > enumerators but did not adjust the array for BCM4908, thus breaking the
> > xHCI controller (and boot process) on this platform and revealing the
> > fragility of this approach.
> >
> > Since these arrays are a little sparse (many elements are zero) and the
> > position of the array elements is significant only insofar as they agree
> > with the enumerators, designated initializers are a better fit than
> > positional initializers here. Convert this table accordingly, fixing the
> > boot-time crash on BCM4908 in the process.
> >
> > Fixes: 4536fe9640b6 ("phy: usb: suppress OC condition for 7439b2")
> > Signed-off-by: Sam Edwards <CFSworks@...il.com>

Hi Florian,

>
> Thanks a bunch for the fix, good catch! Sorry to ask you this, but since
> this is intended to be backported to stable trees at some point, would
> you mind breaking this up in two commits:
>
> - one which is easy to review and audit and which adjusts the BCM4908 entry
> - another one which converts to using designated index constants?

Not a problem at all! I'd much rather address feedback like this
myself so I can practice the proper formatting than have you take care
of it. I'll send a split-up v2 in a moment. :)

Kind regards,
Sam

>
> Thanks!
> --
> Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ