On 3/14/19 3:50 AM, Paolo Bonzini wrote:
> There is a prctl to query the state, ARCH_X86_CET_STATUS, but I'm a bit
> wary of adding support for it before it hits the kernel; IBT only needs
> compiler support because the instructions/prefixes are a nop if
> disabled, unlike SHSTK which needs the "allocate shadow stack" prctl.
> It's a small fixed cost per TB, it seemed not a big deal to me.

There's a cpuid bit though, leaf 7, ebx bit 20.  If that's not set...

It's a small fixed cost, and it's possible that it's lost in the padding
between TB's.  But per 256k TB's it's 1MB "wasted", worst case.


r~

Reply via email to