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>] [day] [month] [year] [list]
Date:   Mon, 4 Jun 2018 11:55:56 -0700
From:   Yang Shi <yang.shi@...ux.alibaba.com>
To:     emunson@...mai.com, "linux-mm@...ck.org" <linux-mm@...ck.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: [QUESTION] About VM_LOCKONFAULT for file page

Hi folks,


I did a quick test with mlock2 + VM_LOCKONFAULT flag. The test just does 
an 1MB anonymous map and 1MB file map with VM_LOCKONFAULT respectively. 
Then it tries to access one page of each mapping.


 From /proc/meminfo, I can see 1 page marked mlocked from anonymous 
mapping. But, the page from file mapping is *not* marked as mlocked.


I can see the do_anonymous_page() calls 
lru_cache_add_active_or_unevictable() to set the page's PG_mlocked flag. 
But, do_read_fault()/do_shared_fault()/do_cow_fault() don't do it, it 
looks they just do it for COW page.


I'm a little bit confused. Does VM_LOCKONFAULT work for anonymous map 
only? Or did I miss something? Any hint is appreciated.


Thanks,

Yang

Powered by blists - more mailing lists