lkml.org 
[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 2/4] LoongArch: Add kprobe support
From
Date


On 12/14/2022 03:28 PM, Masami Hiramatsu (Google) wrote:
> Hi,
>
> On Fri, 9 Dec 2022 16:52:59 +0800
> Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
>> Kprobes allows you to trap at almost any kernel address and
>> execute a callback function, this commit adds kprobe support
>> for LoongArch.

...

>> + case KPROBE_HIT_ACTIVE:
>> + case KPROBE_HIT_SSDONE:
>
> Recently, I removed these cases because this page fault will be finally
> handled by the generic pagefault handler.
>

Hi Masami,

I have addressed all your comments on my local machine, the code logic
looks much more clear now, thank you very much.

When I test kprobe_example.ko with a C function like "kernel_clone",
it works well, but the kernel hangs [1] when test with an assembler
function like "__memset_fast" [2].

Just did some quick research and it seems the bug is related with
kallsyms_lookup_name(), I'm looking for a solution.

[1]
https://lore.kernel.org/loongarch/CAEr6+EC2wPAtK8zb3=e1mUiya3gv0UhqF9J_ySYx9p_96pB+tg@mail.gmail.com/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git/tree/arch/loongarch/lib/memset.S?h=loongarch-next#n56

Thanks,
Tiezhu

\
 
 \ /
  Last update: 2022-12-16 10:34    [W:0.048 / U:3.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site