Messages in this thread | | | From | "Jason A. Donenfeld" <> | Date | Thu, 9 Jun 2022 14:29:37 +0200 | Subject | Re: [PATCH] mm/kfence: select random number before taking raw lock |
| |
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
| |