Re: [PATCH] gpio: avoid undersized array bitmap in get fastpath
From: Linus Walleij
Date: Mon Nov 23 2026 - 05:52:15 EST
Hi Kim,
On Sun, Nov 22, 2026 at 5:38 AM <pocj8ur4in@xxxxxxxxx> wrote:
> The array get fast path passes the caller's value bitmap directly to
> get_multiple(). The bitmap is sized for the requested array, but
> providers such as gpio-sim process it for the entire chip. With a
> 128-line chip and a one-line array on a 64-bit kernel, gpio-sim's
> bitmap_replace() reads and writes two words when the caller has
> allocated only one. The second word is accessed even though its mask
> is zero.
Isn't that a problem with gpio-sim that should be fixed there?
Yours,
Linus Walleij