All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: Valentin Schneider <vschneid@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Alexey Klimov <klimov.linux@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andy Whitcroft <apw@canonical.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	David Laight <David.Laight@aculab.com>,
	Dennis Zhou <dennis@kernel.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Kees Cook <keescook@chromium.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH v3 3/4] lib/find_bit: optimize find_next_bit() functions
Date: Fri, 9 Sep 2022 07:47:10 -0700	[thread overview]
Message-ID: <YxtR7tMhXwGEXmbO@yury-laptop> (raw)
In-Reply-To: <yt9dv8pwspkw.fsf@linux.ibm.com>

On Fri, Sep 09, 2022 at 02:24:31PM +0200, Sven Schnelle wrote:
> Hi Yury,
> 
> Yury Norov <yury.norov@gmail.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

  reply	other threads:[~2022-09-09 14:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 17:58 [PATCH v3 0/4] lib: optimize find_bit() functions Yury Norov
2022-08-27 17:58 ` [PATCH v3 1/4] lib/find_bit: introduce FIND_FIRST_BIT() macro Yury Norov
2022-09-07 16:27   ` Valentin Schneider
2022-08-27 17:58 ` [PATCH v3 2/4] lib/find_bit: create find_first_zero_bit_le() Yury Norov
2022-08-30 11:04   ` kernel test robot
2022-09-07 16:27   ` Valentin Schneider
2022-08-27 17:58 ` [PATCH v3 3/4] lib/find_bit: optimize find_next_bit() functions Yury Norov
2022-09-07 16:27   ` Valentin Schneider
2022-09-07 16:57     ` Yury Norov
2022-09-09 12:24       ` Sven Schnelle
2022-09-09 14:47         ` Yury Norov [this message]
2022-09-09 17:03           ` Andy Shevchenko
2022-08-27 17:58 ` [PATCH v3 4/4] tools: sync find_bit() implementation Yury Norov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YxtR7tMhXwGEXmbO@yury-laptop \
    --to=yury.norov@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=apw@canonical.com \
    --cc=catalin.marinas@arm.com \
    --cc=dennis@kernel.org \
    --cc=keescook@chromium.org \
    --cc=klimov.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rasmusvillemoes.dk \
    --cc=linux@roeck-us.net \
    --cc=svens@linux.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.