Re: [PATCH v2] io_uring: propagate array_index_nospec opcode into req->opcode
From: Michael Bommarito
Date: Mon May 18 2026 - 11:04:37 EST
On Mon, May 18, 2026 at 10:43 AM Caleb Sander Mateos
<csander@xxxxxxxxxxxxxxx> 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/0f7e9184-f317-40f1-b366-d8582cb97ac4@xxxxxxxxx/
Thanks,
Mike