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

Chen Zhongjin chenzhongjin at huawei.com
Fri Oct 7 20:10:36 PDT 2022


Hi,

Sorry for late reply because I just found this thread before the long 
vacation so I didn't have much time to deal with it.

On 2022/10/7 4:35, Nick Desaulniers wrote:
> On Fri, Sep 30, 2022 at 2:15 PM Nick Desaulniers
> <ndesaulniers at google.com> 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@shell.armlinux.org.uk/
> https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=9231/1
> How would you like to proceed here?

Since 6.1 is closing now. Let's reorganize everything and queue it up 
for -next for 6.2

> 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?

This way looks good to me.

How about making a set for this,  to make everything more clear:

1. Move this out of line

2. Apply the feature, test with gcc & clang

3. Other cleaning, or merge with 2 if the cleaning is tiny.

I'll send another version for this, rebased to 6.1-rc1

Thanks for your time!


Best,

Chen





More information about the linux-arm-kernel mailing list