arm64: Add types to indirect called assembly functions
authorSami Tolvanen <samitolvanen@google.com>
Thu, 8 Sep 2022 21:54:51 +0000 (14:54 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 26 Sep 2022 17:13:13 +0000 (10:13 -0700)
commitc50d32859e70f6dbccb7d151408eb10afbbb7965
treedce8f9e7ba7a14016d5e7c8d1d198691762e20a7
parent44f665b69c67f0a17a0c8748030ed30205532149
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
arch/arm64/crypto/ghash-ce-core.S
arch/arm64/crypto/sm3-ce-core.S
arch/arm64/include/asm/linkage.h
arch/arm64/kernel/cpu-reset.S
arch/arm64/mm/proc.S