diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2022-09-09 00:54:51 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2022-09-26 20:13:13 +0300 |
commit | c50d32859e70f6dbccb7d151408eb10afbbb7965 (patch) | |
tree | dce8f9e7ba7a14016d5e7c8d1d198691762e20a7 /arch/arm64/include/asm/linkage.h | |
parent | 44f665b69c67f0a17a0c8748030ed30205532149 (diff) | |
download | linux-c50d32859e70f6dbccb7d151408eb10afbbb7965.tar.xz |
arm64: Add types to indirect called assembly functions
With CONFIG_CFI_CLANG, assembly functions indirectly called from C
code must be annotated with type identifiers to pass CFI checking. Use
SYM_TYPED_FUNC_START for the indirectly called functions, and ensure
we emit `bti c` also with SYM_TYPED_FUNC_START.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220908215504.3686827-10-samitolvanen@google.com
Diffstat (limited to 'arch/arm64/include/asm/linkage.h')
-rw-r--r-- | arch/arm64/include/asm/linkage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h index 43f8c25b3fda..1436fa1cde24 100644 --- a/arch/arm64/include/asm/linkage.h +++ b/arch/arm64/include/asm/linkage.h @@ -39,4 +39,8 @@ SYM_START(name, SYM_L_WEAK, SYM_A_NONE) \ bti c ; +#define SYM_TYPED_FUNC_START(name) \ + SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \ + bti c ; + #endif |