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]
Date:   Tue, 22 Oct 2019 09:57:45 +0200
From:   Oscar Salvador <osalvador@...e.de>
To:     David Hildenbrand <david@...hat.com>
Cc:     n-horiguchi@...jp.nec.com, mhocko@...nel.org,
        mike.kravetz@...cle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 15/16] mm/hwpoison-inject: Rip off duplicated
 checks

On Mon, Oct 21, 2019 at 11:40:39AM +0200, David Hildenbrand wrote:
> I explored somewhere already why this code was added:
> 
> 
> commit 31d3d3484f9bd263925ecaa341500ac2df3a5d9b
> Author: Wu Fengguang <fengguang.wu@...el.com>
> Date:   Wed Dec 16 12:19:59 2009 +0100
> 
>     HWPOISON: limit hwpoison injector to known page types
>     
>     __memory_failure()'s workflow is
>     
>             set PG_hwpoison
>             //...
>             unset PG_hwpoison if didn't pass hwpoison filter
>     
>     That could kill unrelated process if it happens to page fault on the
>     page with the (temporary) PG_hwpoison. The race should be big enough to
>     appear in stress tests.
>     
>     Fix it by grabbing the page and checking filter at inject time.  This
>     also avoids the very noisy "Injecting memory failure..." messages.
>     
>     - we don't touch madvise() based injection, because the filters are
>       generally not necessary for it.
>     - if we want to apply the filters to h/w aided injection, we'd better to
>       rearrange the logic in __memory_failure() instead of this patch.
>     
>     AK: fix documentation, use drain all, cleanups
> 
> 
> You should justify why it is okay to do rip that code out now.
> It's not just duplicate checks.
> 
> Was the documented race fixed?
> Will we fix the race within memory_failure() later?
> Don't we care?
> 
> Also, you should add that this fixes the access of uninitialized memmaps
> now and makes the interface work correctly with devmem.

Thanks for bringuing this up David.
I guess I was carried away.

Since I have to do another re-spin to re-work a couple of things, I will
work on this as well.

-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ