coroutine/arm64/Context.S: Insert bti c as BTI landing pad

This commit is contained in:
Yuta Saito 2023-12-21 15:19:25 +09:00
parent d9e5564ccd
commit 35587150e2

View file

@ -28,8 +28,12 @@
PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
#if defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT != 0) #if defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT != 0)
# paciasp # paciasp (it also acts as BTI landing pad, so no need to insert BTI also)
hint #25 hint #25
#elif defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT != 0)
# For the the case PAC is not enabled but BTI is.
# bti c
hint #34
#endif #endif
# Make space on the stack for caller registers # Make space on the stack for caller registers
sub sp, sp, 0xb0 sub sp, sp, 0xb0