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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 16 Sep 2021 20:29:57 -0400
From:   Peter Xu <peterx@...hat.com>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH] mm/smaps: Use vma->vm_pgoff directly when counting
 partial swap

On Fri, Sep 17, 2021 at 12:17:32AM +0200, Vlastimil Babka wrote:
> On 9/16/21 11:58 PM, Peter Xu wrote:
> > linear_page_index(vma, vma->vm_start) of a shmem vma is exactly vm_pgoff.
> 
> Could you use "vma->vm_pgoff + vma_pages(vma)" instead of the other
> linear_page_index() then?

Sure.

> 
> But now I wonder, is smaps_pte_hole() broken? it calls
> shmem_partial_swap_usage with addresses, not pgoffs?

Hmm, that seems true..  I guess it still gets the right number when start==0
and when the vma covers the whole file (which could be the simplest scenario),
but not otherwise.

I'll add a new patch.

Thanks,

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ