[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Sep 2022 07:47:10 -0700
From: Yury Norov <yury.norov@...il.com>
To: Sven Schnelle <svens@...ux.ibm.com>
Cc: Valentin Schneider <vschneid@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Alexey Klimov <klimov.linux@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Andy Whitcroft <apw@...onical.com>,
Catalin Marinas <catalin.marinas@....com>,
David Laight <David.Laight@...lab.com>,
Dennis Zhou <dennis@...nel.org>,
Guenter Roeck <linux@...ck-us.net>,
Kees Cook <keescook@...omium.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH v3 3/4] lib/find_bit: optimize find_next_bit() functions
On Fri, Sep 09, 2022 at 02:24:31PM +0200, Sven Schnelle wrote:
> Hi Yury,
>
> Yury Norov <yury.norov@...il.com> writes:
>
> > On Wed, Sep 07, 2022 at 05:27:08PM +0100, Valentin Schneider wrote:
> >> On 27/08/22 10:58, Yury Norov wrote:
> >> > +#define FIND_NEXT_BIT(FETCH, MUNGE, size, start) \
> >> > +({ \
> >> > + unsigned long mask, idx, tmp, sz = (size), __start = (start); \
> >> > + \
> >> > + if (unlikely(__start >= sz)) \
> >> > + goto out; \
> >> > + \
> >> > + mask = MUNGE(BITMAP_FIRST_WORD_MASK(__start)); \
> >> > + idx = __start / BITS_PER_LONG; \
> >> > + \
> >> > + for (tmp = (FETCH) & mask; !tmp; tmp = (FETCH)) { \
> >> > + if (idx > sz / BITS_PER_LONG) \
> >>
> >> Does that want to be
> >
> > Yes, I already fixed this.
> >
> >> if (idx + 1 >= sz / BITS_PER_LONG)
> >>
> >> ?
>
> Did you push that already? We're still seeing crashes in CI, and the
> 'idx + 1' doesnt seem to be in next-20220908. Adding it makes the
> out-of-bound access go away, but the kernel will crash later in the
> block mq code:
Hi Swen,
I removed the whole series and will resend it with an appropriate fixes
at the weekend. Hopefully it will disappear in next-20220909 or 10.
Thanks,
Yury
Powered by blists - more mailing lists