From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH] MIPS: uprobes: Restore thread.trap_nr
Date: Mon, 24 Apr 2023 13:32:16 +0200 [thread overview]
Message-ID: <20230424113216.GA7962@alpha.franken.de> (raw)
In-Reply-To: <1682213883-3654-1-git-send-email-yangtiezhu@loongson.cn>
On Sun, Apr 23, 2023 at 09:38:03AM +0800, Tiezhu Yang wrote:
> thread.trap_nr is saved in arch_uprobe_pre_xol(), it should be restored
> in arch_uprobe_{post,abort}_xol() accordingly, actually it was only done
> in the post function, just do it in the abort function too, this change
> is similar with x86 and powerpc.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> arch/mips/kernel/uprobes.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c
> index 6b630ed..401b148 100644
> --- a/arch/mips/kernel/uprobes.c
> +++ b/arch/mips/kernel/uprobes.c
> @@ -191,6 +191,7 @@ void arch_uprobe_abort_xol(struct arch_uprobe *aup,
> {
> struct uprobe_task *utask = current->utask;
>
> + current->thread.trap_nr = utask->autask.saved_trap_nr;
> instruction_pointer_set(regs, utask->vaddr);
> }
>
> --
> 2.1.0
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2023-04-24 11:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 1:38 [PATCH] MIPS: uprobes: Restore thread.trap_nr Tiezhu Yang
2023-04-23 3:08 ` Bagas Sanjaya
2023-04-23 10:39 ` Tiezhu Yang
2023-04-24 11:07 ` Oleg Nesterov
2023-04-24 11:32 ` Thomas Bogendoerfer [this message]
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=20230424113216.GA7962@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.