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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Md3A=cmD-B0gFfdbTEMGH6YjCr3BhN5EhJWJhreuAMDdg@mail.gmail.com>
Date:   Thu, 5 Oct 2023 11:29:55 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Mark Brown <broonie@...nel.org>,
        Florian Fainelli <florian.fainelli@...adcom.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>, linux-spi@...r.kernel.org,
        linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH] spi: bcm2835: add a sentinel at the end of the lookup array

On Thu, Oct 5, 2023 at 11:10 AM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Wed, Oct 04, 2023 at 08:39:06PM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> >
> > GPIOLIB expects the array of lookup entries to be terminated with an
> > empty member. We need to increase the size of the variable length array
> > in the lookup table by 1.
>
> Right and seems we (used to?) have the same mistake spread over the kernel.

Almost all lookup tables are static and have a sentinel appended. The
temporary lookup hack is only used here and in the int3472 driver
AFAIK so it's not that bad.

> Perhaps a helper at some point?
>

I don't want to make it a habit for people. This is still a hack, just
less bad than what was here before. So I don't think we need a helper
here.

Bart

> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ