PAC/BTI: no need to keep using `hint`.

The toolchain is new enough that should be able to use the actual
instructions now...

Test: treehugger
Change-Id: I30aafcdc5386268344c40dc6cc9a22caf591915a
This commit is contained in:
Elliott Hughes 2021-01-25 08:49:01 -08:00
parent 7cff764f3c
commit 3e1d5563b6
3 changed files with 6 additions and 6 deletions

View File

@ -118,7 +118,7 @@ END(_setjmp)
// int sigsetjmp(sigjmp_buf env, int save_signal_mask); // int sigsetjmp(sigjmp_buf env, int save_signal_mask);
ENTRY(sigsetjmp) ENTRY(sigsetjmp)
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(sigsetjmp) __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(sigsetjmp)
hint #25 // paciasp paciasp
.cfi_negate_ra_state .cfi_negate_ra_state
stp x0, x30, [sp, #-16]! stp x0, x30, [sp, #-16]!
.cfi_def_cfa_offset 16 .cfi_def_cfa_offset 16
@ -186,7 +186,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(sigsetjmp)
#endif #endif
mov w0, #0 mov w0, #0
hint #29 // autiasp autiasp
.cfi_negate_ra_state .cfi_negate_ra_state
ret ret
END(sigsetjmp) END(sigsetjmp)
@ -296,7 +296,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(siglongjmp)
// Set return value. // Set return value.
cmp w1, wzr cmp w1, wzr
csinc w0, w1, wzr, ne csinc w0, w1, wzr, ne
hint #29 // autiasp autiasp
.cfi_negate_ra_state .cfi_negate_ra_state
ret ret
END(siglongjmp) END(siglongjmp)

View File

@ -67,7 +67,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(vfork)
// Clean up stack shadow in the parent process. // Clean up stack shadow in the parent process.
// https://github.com/google/sanitizers/issues/925 // https://github.com/google/sanitizers/issues/925
hint #25 // paciasp paciasp
.cfi_negate_ra_state .cfi_negate_ra_state
stp x0, x30, [sp, #-16]! stp x0, x30, [sp, #-16]!
.cfi_adjust_cfa_offset 16 .cfi_adjust_cfa_offset 16
@ -81,7 +81,7 @@ __BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(vfork)
.cfi_adjust_cfa_offset -16 .cfi_adjust_cfa_offset -16
.cfi_restore x0 .cfi_restore x0
.cfi_restore x30 .cfi_restore x30
hint #29 // autiasp autiasp
.cfi_negate_ra_state .cfi_negate_ra_state
#endif #endif

View File

@ -49,7 +49,7 @@ __used static void _start_main(void* raw_args) {
#define POST "; .size _start, .-_start" #define POST "; .size _start, .-_start"
#if defined(__aarch64__) #if defined(__aarch64__)
__asm__(PRE "/* BTI J */ hint #36; mov x0,sp; b _start_main" POST); __asm__(PRE "bti j; mov x0,sp; b _start_main" POST);
#elif defined(__arm__) #elif defined(__arm__)
__asm__(PRE "mov r0,sp; b _start_main" POST); __asm__(PRE "mov r0,sp; b _start_main" POST);
#elif defined(__i386__) #elif defined(__i386__)