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: Wed, 13 Mar 2024 23:26:22 +0100
From: David Hildenbrand <david@...hat.com>
To: peterx@...hat.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
 Muhammad Usama Anjum <usama.anjum@...labora.com>
Subject: Re: [PATCH] mm/memory: Fix missing pte marker for !page on pte zaps

On 13.03.24 23:03, David Hildenbrand wrote:
> On 13.03.24 22:31, peterx@...hat.com wrote:
>> From: Peter Xu <peterx@...hat.com>
>>
>> Commit 0cf18e839f64 of large folio zap work broke uffd-wp.  Now mm's uffd
>> unit test "wp-unpopulated" will trigger this WARN_ON_ONCE().
> 
> Good that I added the WARN_ON_ONCE() :)
> 
>>
>> The WARN_ON_ONCE() asserts that an VMA cannot be registered with
>> userfaultfd-wp if it contains a !normal page, but it's actually possible.
>> One example is an anonymous vma, register with uffd-wp, read anything will
>> install a zero page.  Then when zap on it, this should trigger.
> 
> Are you sure? zap_install_uffd_wp_if_needed() contains right at the start:
> 
> 	/* Zap on anonymous always means dropping everything */
> 	if (vma_is_anonymous(vma))
> 		return;
> 
> So if that's the case the unit test triggers, I'm confused.


Ah, got it. It's not that we have to place a marker, just that it can 
happen. Of course it can. All makes sense.

Thanks!

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ