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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqlzhlrjJhqvUV4I@localhost.localdomain>
Date:   Wed, 15 Jun 2022 07:52:06 +0200
From:   Oscar Salvador <osalvador@...e.de>
To:     zhenwei pi <pizhenwei@...edance.com>
Cc:     naoya.horiguchi@....com, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org, david@...hat.com,
        linmiaohe@...wei.com, gregkh@...uxfoundation.org
Subject: Re: Re: [PATCH v5 1/1] mm/memory-failure: disable unpoison once hw
 error happens

On Wed, Jun 15, 2022 at 01:18:23PM +0800, zhenwei pi wrote:
> Hi,
> 
> Because memory_failure() may be called by hardware error randomly,
> hw_memory_failure should be protected by mf_mutex to avoid this case:
> int unpoison_memory(unsigned long pfn)
> {
>     ...
>     if (hw_memory_failure) {
>     }
>     ... --> memory_failure() happens, and mark hw_memory_failure as true
>     mutex_lock(&mf_mutex);

Yeah, I am aware of that.
But once memory_failure() sets hw_memory_failure to true, it does not really matter
whether unpoison_memory() checks that while holding or not the lock, does it?

Note that it does not really matter in the end, but I am just curious whether
there is any strong impediment to that. 


-- 
Oscar Salvador
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ