From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Marco Elver <elver@google.com>
Cc: Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
John Ogness <john.ogness@linutronix.de>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] mm/kfence: select random number before taking raw lock
Date: Thu, 9 Jun 2022 14:29:37 +0200 [thread overview]
Message-ID: <CAHmME9rkQDnsTu-8whevtBa_J6aOKT=gQO7kBAxwWrBgKgcyUQ@mail.gmail.com> (raw)
In-Reply-To: <CANpmjNMKEP246YyDDqW5TPb090f4Fr-PY3Kn2X7N62wTRCEUrw@mail.gmail.com>
On Thu, Jun 9, 2022 at 2:27 PM Marco Elver <elver@google.com> wrote:
> The compiler should elide this branch entirely if
> CONFIG_KFENCE_STRESS_TEST_FAULTS=0, but not sure it'll always do so
> now. My suggestion is to make both new bools consts, to help out the
> compiler a little.
>
> Otherwise looks good, thanks for the quick fix!
Disassembling reveals it still does elide. (gcc 11.3) But I'll make
them const just in case and send a v2.
Jason
next prev parent reply other threads:[~2022-06-09 12:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 12:17 Jason A. Donenfeld
2022-06-09 12:27 ` Marco Elver
2022-06-09 12:29 ` Jason A. Donenfeld [this message]
2022-06-09 12:33 ` [PATCH v2] " Jason A. Donenfeld
2022-06-09 12:41 ` Marco Elver
2022-06-09 12:52 ` Petr Mladek
2022-06-09 12:31 ` [PATCH] " Geert Uytterhoeven
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='CAHmME9rkQDnsTu-8whevtBa_J6aOKT=gQO7kBAxwWrBgKgcyUQ@mail.gmail.com' \
--to=jason@zx2c4.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=geert@linux-m68k.org \
--cc=glider@google.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox