Re: [PATCH v2] io_uring: propagate array_index_nospec opcode into req->opcode
Michael Bommarito <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAJJ9bXxw-Ne_PiqHeXYEeJ8Gw4OLDf0fS1nq5mV4qC=CXp2GBA@mail.gmail.com> |
On Mon, May 18, 2026 at 10:43 AM Caleb Sander Mateos <[email protected]> wrote: > The local variable should improve performance, I'm not sure removing > it is a good idea. Due to the intervening stores, the compiler can't > tell that req->opcode is unchanged between this assignment and the > later loads, so it will have to reload it from memory. Can you just > assign to the local variable opcode here and wait to assign to > req->opcode until after updating opcode with array_index_nospec()? I'd defer to you / Jens / Keith on this, but in case you haven't seen it, I was just following Jens's request here: https://lore.kernel.org/all/[email protected]/ Thanks, Mike