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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210506173757.586580bd@alex-virtual-machine>
Date:   Thu, 6 May 2021 17:37:57 +0800
From:   Aili Yao <yaoaili@...gsoft.com>
To:     Naoya Horiguchi <nao.horiguchi@...il.com>
CC:     <linux-mm@...ck.org>, Tony Luck <tony.luck@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Oscar Salvador <osalvador@...e.de>,
        "David Hildenbrand" <david@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        "Andy Lutomirski" <luto@...nel.org>,
        Naoya Horiguchi <naoya.horiguchi@....com>,
        Jue Wang <juew@...gle.com>, <linux-kernel@...r.kernel.org>,
        <yaoaili126@...il.com>
Subject: Re: [PATCH v4 1/2] mm/memory-failure: Use a mutex to avoid
 memory_failure() races

On Tue, 27 Apr 2021 15:29:52 +0900
Naoya Horiguchi <nao.horiguchi@...il.com> wrote:

> From: Tony Luck <tony.luck@...el.com>
> 
> There can be races when multiple CPUs consume poison from the same
> page. The first into memory_failure() atomically sets the HWPoison
> page flag and begins hunting for tasks that map this page. Eventually
> it invalidates those mappings and may send a SIGBUS to the affected
> tasks.
> 
> But while all that work is going on, other CPUs see a "success"
> return code from memory_failure() and so they believe the error
> has been handled and continue executing.
> 
> Fix by wrapping most of the internal parts of memory_failure() in
> a mutex.
> 
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@....com>
> Reviewed-by: Borislav Petkov <bp@...e.de>

Sorry to interrupt, I just thought one thing:

This mutex seems not been bind to the error page, will there be some core case
like test code or multi-poison case whick will break this mutex?

Thanks!
Aili Yao 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ