1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef __ASM_COMPILER_H 3 #define __ASM_COMPILER_H 4 5 #ifdef ARM64_ASM_ARCH 6 #define ARM64_ASM_PREAMBLE ".arch " ARM64_ASM_ 7 #else 8 #define ARM64_ASM_PREAMBLE 9 #endif 10 11 #define xpaclri(ptr) 12 ({ 13 register unsigned long __xpaclri_ptr a 14 15 asm( 16 ARM64_ASM_PREAMBLE 17 " hint #7\n" 18 : "+r" (__xpaclri_ptr)); 19 20 __xpaclri_ptr; 21 }) 22 23 #ifdef CONFIG_ARM64_PTR_AUTH_KERNEL 24 #define ptrauth_strip_kernel_insn_pac(ptr) 25 #else 26 #define ptrauth_strip_kernel_insn_pac(ptr) 27 #endif 28 29 #ifdef CONFIG_ARM64_PTR_AUTH 30 #define ptrauth_strip_user_insn_pac(ptr) 31 #else 32 #define ptrauth_strip_user_insn_pac(ptr) 33 #endif 34 35 #if !defined(CONFIG_BUILTIN_RETURN_ADDRESS_STR 36 #define __builtin_return_address(val) 37 (void *)(ptrauth_strip_kernel_insn_pac 38 #endif 39 40 #endif /* __ASM_COMPILER_H */ 41
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.