[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210121114233.GC48431@C02TD0UTHF1T.local>
Date: Thu, 21 Jan 2021 11:42:33 +0000
From: Mark Rutland <mark.rutland@....com>
To: guoren@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-csky@...r.kernel.org,
Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH 19/29] csky: mm: abort uaccess retries upon fatal signal
On Thu, Jan 21, 2021 at 02:53:39PM +0800, guoren@...nel.org wrote:
> From: Guo Ren <guoren@...ux.alibaba.com>
>
> Pick up the patch from the 'Link' made by Mark Rutland. Keep the
> same with x86, arm, arm64, arc, sh, power.
>
> Link: https://lore.kernel.org/linux-arm-kernel/1499782763-31418-1-git-send-email-mark.rutland@arm.com/
> Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> Cc: Mark Rutland <mark.rutland@....com>
> ---
> arch/csky/mm/fault.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c
> index c7b67976bac4..1482de56f4f7 100644
> --- a/arch/csky/mm/fault.c
> +++ b/arch/csky/mm/fault.c
> @@ -279,8 +279,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
> * signal first. We do not need to release the mmap_lock because it
> * would already be released in __lock_page_or_retry in mm/filemap.c.
> */
> - if (fault_signal_pending(fault, regs))
> + if (fault_signal_pending(fault, regs)) {
> + if (!user_mode(regs))
> + no_context(regs, addr);
> return;
> + }
FWIW, this looks right to me -- I assumed you've tested with the
test-case in the linked email?
It looks like a number of other architectures are still broken here. :/
I'll go and poke them...
Thanks,
Mark.
> if (unlikely((fault & VM_FAULT_RETRY) && (flags & FAULT_FLAG_ALLOW_RETRY))) {
> flags |= FAULT_FLAG_TRIED;
> --
> 2.17.1
>
Powered by blists - more mailing lists