From: Youling Tang <tangyouling@loongson.cn>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v2 4/4] LoongArch: Add uprobes support
Date: Mon, 17 Apr 2023 10:04:02 +0800 [thread overview]
Message-ID: <26d4d13f-d678-be54-6b40-b87c71856eff@loongson.cn> (raw)
In-Reply-To: <1681464781-4428-5-git-send-email-yangtiezhu@loongson.cn>
Hi, Tiezhu
On 04/14/2023 05:33 PM, Tiezhu Yang wrote:
/* snip */
> diff --git a/arch/loongarch/kernel/traps.c b/arch/loongarch/kernel/traps.c
> index de8ebe2..cfc2e0c 100644
> --- a/arch/loongarch/kernel/traps.c
> +++ b/arch/loongarch/kernel/traps.c
> @@ -45,6 +45,7 @@
> #include <asm/tlb.h>
> #include <asm/types.h>
> #include <asm/unwind.h>
> +#include <asm/uprobes.h>
>
> #include "access-helper.h"
>
> @@ -440,7 +441,6 @@ asmlinkage void noinstr do_bp(struct pt_regs *regs)
> if (regs->csr_prmd & CSR_PRMD_PIE)
> local_irq_enable();
>
> - current->thread.trap_nr = read_csr_excode();
> if (__get_inst(&opcode, (u32 *)era, user))
> goto out_sigsegv;
>
> @@ -462,18 +462,17 @@ asmlinkage void noinstr do_bp(struct pt_regs *regs)
> else
> break;
> case BRK_UPROBE_BP:
> - if (notify_die(DIE_UPROBE, "Uprobe", regs, bcode,
> - current->thread.trap_nr, SIGTRAP) == NOTIFY_STOP)
> + if (uprobe_breakpoint_handler(regs))
> goto out;
> else
> break;
> case BRK_UPROBE_XOLBP:
> - if (notify_die(DIE_UPROBE_XOL, "Uprobe_XOL", regs, bcode,
> - current->thread.trap_nr, SIGTRAP) == NOTIFY_STOP)
> + if (uprobe_singlestep_handler(regs))
After the above modification, we should remove the DIE_UPROBE and
DIE_UPROBE_XOL definitions in arch/loongarch/include/asm/kdebug.h.
At the same time DIE_BREAK, DIE_SSTEPBP and DIE_PAGE_FAULT also need to
be removed after 6d4cc40fb5f581 ("LoongArch: Add kprobes support").
Thanks,
Youling
> goto out;
> else
> break;
> default:
> + current->thread.trap_nr = read_csr_excode();
> if (notify_die(DIE_TRAP, "Break", regs, bcode,
> current->thread.trap_nr, SIGTRAP) == NOTIFY_STOP)
> goto out;
next prev parent reply other threads:[~2023-04-17 2:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 9:32 [PATCH v2 0/4] Add uprobes support for LoongArch Tiezhu Yang
2023-04-14 9:32 ` [PATCH v2 1/4] LoongArch: Move three functions from kprobes.c to inst.c Tiezhu Yang
2023-04-14 9:32 ` [PATCH v2 2/4] LoongArch: Add larch_insn_gen_break() to generate break insns Tiezhu Yang
2023-04-14 9:33 ` [PATCH v2 3/4] LoongArch: Use larch_insn_gen_break() for kprobes Tiezhu Yang
2023-04-14 9:33 ` [PATCH v2 4/4] LoongArch: Add uprobes support Tiezhu Yang
2023-04-17 2:04 ` Youling Tang [this message]
2023-04-17 9:18 ` Tiezhu Yang
2023-04-17 3:17 ` [PATCH v2 0/4] Add uprobes support for LoongArch Hengqi Chen
2023-04-17 9:22 ` Tiezhu Yang
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=26d4d13f-d678-be54-6b40-b87c71856eff@loongson.cn \
--to=tangyouling@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=yangtiezhu@loongson.cn \
/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®