[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJF2gTQR804AwU0up2-FyTciQZJY2M9xQ7JbiqjwMbkD=aLhCQ@mail.gmail.com>
Date: Tue, 27 Sep 2022 07:41:12 +0800
From: Guo Ren <guoren@...nel.org>
To: Jun Yi <yijun@...ngson.cn>
Cc: Huacai Chen <chenhuacai@...nel.org>,
WANG Xuerui <kernel@...0n.name>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Qing Zhang <zhangqing@...ngson.cn>,
Mao Bibo <maobibo@...ngson.cn>,
Jianmin Lv <lvjianmin@...ngson.cn>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] LoongArch: Fixup do_ri csr_era
On Mon, Sep 26, 2022 at 8:27 PM Jun Yi <yijun@...ngson.cn> wrote:
>
> csr_era of pt_regs in do_ri should not add 4 to point to the
> next instruction.
The comment does not make sense. I think it wants to skip some
instructions, but your patch broke that.
>
> Signed-off-by: Jun Yi <yijun@...ngson.cn>
> ---
> arch/loongarch/kernel/traps.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/loongarch/kernel/traps.c b/arch/loongarch/kernel/traps.c
> index aa1c95aaf595..ec888eda3d45 100644
> --- a/arch/loongarch/kernel/traps.c
> +++ b/arch/loongarch/kernel/traps.c
> @@ -477,8 +477,6 @@ asmlinkage void noinstr do_ri(struct pt_regs *regs)
>
> die_if_kernel("Reserved instruction in kernel code", regs);
>
> - compute_return_era(regs);
> -
> if (unlikely(get_user(opcode, era) < 0)) {
> status = SIGSEGV;
> current->thread.error_code = 1;
> --
> 2.31.1
>
--
Best Regards
Guo Ren
Powered by blists - more mailing lists