lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RESEND PATCH] ARM: Recover kretprobes return address for EABI stack unwinder
On Mon, Aug 15, 2022 at 1:06 PM Chen Zhongjin <chenzhongjin@huawei.com> wrote:

> 'fed240d9c974 ("ARM: Recover kretprobe modified return address in stacktrace")'
> has implemented kretprobes return address recovery for FP
> unwinder, this patch makes it works for EABI unwinder.
>
> It saves __kretprobe_trampoline address in LR on stack to identify
> and recover the correct return address in EABI unwinder.
>
> Since EABI doesn't use r11 as frame pointer, we need to use SP to
> identify different kretprobes addresses. Here the value of SP has fixed
> distance to conventional FP position so it's fine to use it.
>
> Passed kunit kprobes_test on QEMU.
>
> Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>

This looks correct to me FWIW I understand the assembly
but I'm vaguely unfamiliar with the kprobe API, but anyway:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Would you please drop it into Russell's patch tracker?

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2022-08-22 13:23    [W:0.040 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site