public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>, Guo Ren <guoren@kernel.org>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	loongson-kernel@lists.loongnix.cn,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Subject: Re: [PATCH] riscv: uprobes: Restore thread.bad_cause
Date: Mon, 24 Apr 2023 17:28:41 +0200	[thread overview]
Message-ID: <20230424152841.GB32615@redhat.com> (raw)
In-Reply-To: <f60e6e0f-a520-2e8d-0b81-6b15498cb300@loongson.cn>

On 04/24, Tiezhu Yang wrote:
>
> >diff --git a/arch/riscv/kernel/probes/uprobes.c b/arch/riscv/kernel/probes/uprobes.c
> >index c976a21..194f166 100644
> >--- a/arch/riscv/kernel/probes/uprobes.c
> >+++ b/arch/riscv/kernel/probes/uprobes.c
> >@@ -67,6 +67,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
> > 	struct uprobe_task *utask = current->utask;
> >
> > 	WARN_ON_ONCE(current->thread.bad_cause != UPROBE_TRAP_NR);
> >+	current->thread.bad_cause = utask->autask.saved_cause;
> >
> > 	instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size);
> >
> >@@ -102,6 +103,7 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
> > {
> > 	struct uprobe_task *utask = current->utask;
> >
> >+	current->thread.bad_cause = utask->autask.saved_cause;
> > 	/*
> > 	 * Task has received a fatal signal, so reset back to probbed
> > 	 * address.
> >

Acked-by: Oleg Nesterov <oleg@redhat.com>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-04-24 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  1:42 [PATCH] riscv: uprobes: Restore thread.bad_cause Tiezhu Yang
2023-04-24 11:49 ` Tiezhu Yang
2023-04-24 15:28   ` Oleg Nesterov [this message]
2023-05-05 10:01 ` Guo Ren
2023-06-15 15:30   ` Tiezhu Yang
2023-06-20 19:27 ` Palmer Dabbelt
2023-06-20 19:40 ` patchwork-bot+linux-riscv

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=20230424152841.GB32615@redhat.com \
    --to=oleg@redhat.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=guoren@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=srikar@linux.vnet.ibm.com \
    --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