Re: [RFC PATCH v9 05/27] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack protection

Dave Hansen
2020-02-27T18:03:42Z

On 2/26/20 7:57 PM, Andy Lutomirski wrote:
>> GCC 8 or above is needed since vDSO must be compiled with
>> --fcf-protection=branch.
> Fair enough. I don’t particularly want to carry a gross hack to add
> the ENDBRANCHes without compiler support.

Yeah, that's not worth it.

But my main issue the shadow stack instructions:

>> +ifdef CONFIG_X86_INTEL_SHADOW_STACK_USER
>> + ifeq ($(call as-instr, saveprevssp, y),)
>> + $(error CONFIG_X86_INTEL_SHADOW_STACK_USER not supported by the assembler)
>> + endif
>> +endif

Which are unrelated to ENDBRANCH.

But, in any case, let's say Kconfig says we should try to use IBT, but
we get to building the vDSO and don't have the right toolchain. Do we
just stop the build? Or do we let the build go on and then decline to
let folks enable IBT at runtime?