In preparation for enabling objtool on arm64, annotate intra-function calls.
Signed-off-by: Josh Poimboeuf <[email protected]> --- arch/arm64/kernel/entry.S | 2 ++ arch/arm64/kernel/proton-pack.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index f8018b5c1f9a..cf808bb2abc0 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -10,6 +10,7 @@ #include <linux/arm-smccc.h> #include <linux/init.h> #include <linux/linkage.h> +#include <linux/annotate.h> #include <asm/alternative.h> #include <asm/assembler.h> @@ -707,6 +708,7 @@ alternative_else_nop_endif * entry onto the return stack and using a RET instruction to * enter the full-fat kernel vectors. */ + ANNOTATE_INTRA_FUNCTION_CALL bl 2f b . 2: diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index b3801f532b10..b63887a1b823 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -24,6 +24,7 @@ #include <linux/nospec.h> #include <linux/prctl.h> #include <linux/sched/task_stack.h> +#include <linux/annotate.h> #include <asm/debug-monitors.h> #include <asm/insn.h> @@ -245,11 +246,12 @@ static noinstr void qcom_link_stack_sanitisation(void) { u64 tmp; - asm volatile("mov %0, x30 \n" - ".rept 16 \n" - "bl . + 4 \n" - ".endr \n" - "mov x30, %0 \n" + asm volatile("mov %0, x30 \n" + ".rept 16 \n" + ANNOTATE_INTRA_FUNCTION_CALL " \n" + "bl . + 4 \n" + ".endr \n" + "mov x30, %0 \n" : "=&r" (tmp)); } -- 2.53.0

