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, 24 Oct 2017 10:25:00 +0000
From:   "Du, Fan" <fan.du@...el.com>
To:     "Williams, Dan J" <dan.j.williams@...el.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Hellwig <hch@....de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "Du, Fan" <fan.du@...el.com>
Subject: RE: [PATCH] Add /proc/PID/{smaps, numa_maps} support for DAX



>-----Original Message-----
>From: Dan Williams [mailto:dan.j.williams@...el.com]
>Sent: Tuesday, October 24, 2017 4:47 PM
>To: Du, Fan <fan.du@...el.com>
>Cc: Andrew Morton <akpm@...ux-foundation.org>; Christoph Hellwig
><hch@....de>; linux-kernel@...r.kernel.org; Dave Hansen
><dave.hansen@...ux.intel.com>
>Subject: Re: [PATCH] Add /proc/PID/{smaps, numa_maps} support for DAX
>
>On Tue, Oct 24, 2017 at 12:52 AM, Fan Du <fan.du@...el.com> wrote:
>>
>> So user could check those interface for more detailed
>> information about how much DAX mappings are currently
>> created.
>>
>> Here we use vma_is_dax method to find specific page
>> struture with DAX {huge, normal}page mappings,
>> vm_normal_page routine works as before without any
>> impact on the existing logical where _vm_normal_page
>> are called.
>>
>> Signed-off-by: Fan Du <fan.du@...el.com>
>> ---
>>  fs/proc/task_mmu.c | 25 +++++++++++++++++++------
>>  1 file changed, 19 insertions(+), 6 deletions(-)
>>
>> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
>> index 5589b4b..ba2e58c 100644
>> --- a/fs/proc/task_mmu.c
>> +++ b/fs/proc/task_mmu.c
>> @@ -528,7 +528,11 @@ static void smaps_pte_entry(pte_t *pte, unsigned
>long addr,
>>         struct page *page = NULL;
>>
>>         if (pte_present(*pte)) {
>> -               page = vm_normal_page(vma, addr, *pte);
>> +               if (!vma_is_dax(vma))
>> +                       page = vm_normal_page(vma, addr, *pte);
>> +               else
>> +                       page = pte_page(*pte);
>
>See usage of pte_devmap, pmd_devmap, and pud_devmap in mm/gup.c. You
>need to check for that bit to know that there is a 'struct page' entry
>associated with a DAX mapping.  

Thanks Dan for your review, got it!


>I believe we just need to fix up and
>resend his approach from last year:
>
>    https://marc.info/?l=linux-kernel&m=148045064103357&w=2

Sure, I will rebase Dave's patch and send v2 soon.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ