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: <CACRpkdZf033WftaRXpE2=dzs8cyuMfKVqGqoM6y3+EoqWG8Y-A@mail.gmail.com>
Date: Wed, 3 Jul 2024 14:38:52 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Shiji Yang <yangshiji66@...look.com>, Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-gpio@...r.kernel.org, Asmaa Mnebhi <asmaa@...dia.com>, 
	Andy Shevchenko <andy.shevchenko@...il.com>, linux-kernel@...r.kernel.org, 
	Mark Mentovai <mark@...tovai.com>, Jonas Gorski <jonas.gorski@...il.com>, 
	Lóránd Horváth <lorand.horvath82@...il.com>
Subject: Re: [PATCH] gpio: mmio: do not calculate bgpio_bits via "ngpios"

On Tue, Jun 25, 2024 at 3:22 AM Shiji Yang <yangshiji66@...look.com> wrote:

> bgpio_bits must be aligned with the data bus width. For example, on a
> 32 bit big endian system and we only have 16 GPIOs. If we only assume
> bgpio_bits=16 we can never control the GPIO because the base address
> is the lowest address.
>
> low address                          high address
> -------------------------------------------------
> |   byte3   |   byte2   |   byte1   |   byte0   |
> -------------------------------------------------
> |    NaN    |    NaN    |  gpio8-15 |  gpio0-7  |
> -------------------------------------------------
>
> Fixes: 55b2395e4e92 ("gpio: mmio: handle "ngpios" properly in bgpio_init()")
> Fixes: https://github.com/openwrt/openwrt/issues/15739
> Reported-by: Mark Mentovai <mark@...tovai.com>
> Signed-off-by: Shiji Yang <yangshiji66@...look.com>
> Suggested-By: Mark Mentovai <mark@...tovai.com>
> Reviewed-by: Jonas Gorski <jonas.gorski@...il.com>
> Tested-by: Lóránd Horváth <lorand.horvath82@...il.com>

I'm convinced this is the right thing to do. (By Jonas Gorski.)
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Bart, can you apply it for fixes?
(Or for -next if you wanna be really careful.)

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ