From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 2/4] LoongArch: Add kprobe support
Date: Fri, 16 Dec 2022 17:33:04 +0800 [thread overview]
Message-ID: <0a135b50-ca96-8ee1-6f33-29efcdb256ed@loongson.cn> (raw)
In-Reply-To: <20221214162847.1f9481fd2cf5212657a0fd58@kernel.org>
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
next prev parent reply other threads:[~2022-12-16 9:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 8:52 [PATCH v10 0/4] Add kprobe and kretprobe support for LoongArch Tiezhu Yang
2022-12-09 8:52 ` [PATCH v10 1/4] LoongArch: Simulate branch and PC instructions Tiezhu Yang
2022-12-21 7:42 ` Jinyang He
2022-12-09 8:52 ` [PATCH v10 2/4] LoongArch: Add kprobe support Tiezhu Yang
2022-12-14 7:28 ` Masami Hiramatsu
2022-12-16 9:33 ` Tiezhu Yang [this message]
2022-12-17 2:08 ` Huacai Chen
2022-12-09 8:53 ` [PATCH v10 3/4] LoongArch: Add kretprobe support Tiezhu Yang
2022-12-09 8:53 ` [PATCH v10 4/4] samples/kprobes: Add LoongArch support Tiezhu Yang
2022-12-09 10:01 ` [PATCH v10 0/4] Add kprobe and kretprobe support for LoongArch Huacai Chen
2022-12-09 10:34 ` WANG Xuerui
2022-12-10 13:54 ` Jeff Xie
2022-12-13 3:10 ` Masami Hiramatsu
2022-12-17 2:28 ` Huacai Chen
2022-12-12 8:41 ` Hengqi Chen
2022-12-12 9:35 ` Qing Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a135b50-ca96-8ee1-6f33-29efcdb256ed@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®