lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 15 Aug 2022 14:01:13 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Huacai Chen <chenhuacai@...ngson.cn>
Cc:     Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Xuerui Wang <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LoongArch: mm: avoid unnecessary page fault retires on
 shared memory types

It's an optimization to shared memory types. Looks good.

Reviewed-by: Guo Ren <guoren@...nel.org>

On Mon, Aug 15, 2022 at 12:05 PM Huacai Chen <chenhuacai@...ngson.cn> wrote:
>
> Commit d92725256b4f22d0 ("mm: avoid unnecessary page fault retires on
> shared memory types") modifies do_page_fault() to handle the VM_FAULT_
> COMPLETED case, but forget to change for LoongArch, so fix it as other
> architectures does.
>
> Fixes: d92725256b4f22d0 ("mm: avoid unnecessary page fault retires on shared memory types")
> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> ---
>  arch/loongarch/mm/fault.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/loongarch/mm/fault.c b/arch/loongarch/mm/fault.c
> index 605579b19a00..1ccd53655cab 100644
> --- a/arch/loongarch/mm/fault.c
> +++ b/arch/loongarch/mm/fault.c
> @@ -216,6 +216,10 @@ static void __kprobes __do_page_fault(struct pt_regs *regs,
>                 return;
>         }
>
> +       /* The fault is fully completed (including releasing mmap lock) */
> +       if (fault & VM_FAULT_COMPLETED)
> +               return;
> +
>         if (unlikely(fault & VM_FAULT_RETRY)) {
>                 flags |= FAULT_FLAG_TRIED;
>
> --
> 2.31.1
>


-- 
Best Regards
 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ