Re: [PATCH 4/9] x86/alternative: Implement .retpoline_sites support

From: Peter Zijlstra
Date: Wed Oct 13 2021 - 18:13:08 EST


On Wed, Oct 13, 2021 at 02:49:07PM -0700, Josh Poimboeuf wrote:
> So you've got a WARN_ON_ONCE, a BUG_ON, and a too-deep feature check,
> all in the name of supporting this scheme. ok...

Mostly because I'm way too lazy to type out that table. With the thunks
being in .S, I really don't see that getting messed up, they even in
their own special section too.

> If performance of the linear lookup were a real concern then you could
> just put rax and r11 at the beginning of the array.

That would mean the table would have to be { __thunk, reg_idx }, which
is even more yuck.