Re: [PATCH v3] ARM: kprobes: move __kretprobe_trampoline to out of line assembler

From: Nick Desaulniers
Date: Thu Oct 06 2022 - 16:35:24 EST


On Fri, Sep 30, 2022 at 2:15 PM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> commit 1069c1dd20a3 ("ARM: 9231/1: Recover kretprobes return address for
> EABI stack unwinder")
> tickled a bug in clang's integrated assembler where the .save and .pad
> directives must have corresponding .fnstart directives. The integrated
> assembler is unaware that the compiler will be generating the .fnstart
> directive.
>
> arch/arm/probes/kprobes/core.c:409:30: error: .fnstart must precede
> .save or .vsave directives
> <inline asm>:3:2: note: instantiated into assembly here
> .save {sp, lr, pc}
> ^
> arch/arm/probes/kprobes/core.c:412:29: error: .fnstart must precede
> .pad directive
> <inline asm>:6:2: note: instantiated into assembly here
> .pad #52
> ^
>

Chen, I noticed that your patch was discarded; it's not in linux-next today.
https://lore.kernel.org/linux-arm-kernel/YzHPGvhLkdQcDYzx@xxxxxxxxxxxxxxxxxxxxx/
https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=9231/1
How would you like to proceed here?

I think moving this out of line, incorporating Ard's feedback, then
putting the UNWIND directives on top might be the way to go. What do
you think?
--
Thanks,
~Nick Desaulniers