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]
Message-ID: <209b1956-a46f-41aa-bec1-cd65484f36cd@redhat.com>
Date: Wed, 17 Apr 2024 14:18:10 +0200
From: David Hildenbrand <david@...hat.com>
To: Oscar Salvador <osalvador@...e.de>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 linux-fsdevel@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
 Muchun Song <muchun.song@...ux.dev>
Subject: Re: [PATCH v1 2/2] fs/proc/task_mmu: convert smaps_hugetlb_range() to
 work on folios

On 17.04.24 14:09, Oscar Salvador wrote:
> On Wed, Apr 17, 2024 at 11:23:13AM +0200, David Hildenbrand wrote:
>> Let's get rid of another page_mapcount() check and simply use
>> folio_likely_mapped_shared(), which is precise for hugetlb folios.
>>
>> While at it, use huge_ptep_get() + pte_page() instead of ptep_get() +
>> vm_normal_page(), just like we do in pagemap_hugetlb_range().
> 
> That is fine because vm_normal_page() tries to be clever about  mappings which
> hugetlb does not support, right?

Right, using vm_normal_page() is even completely bogus. Usually (but not 
always) we have PMDs/PUDs and not PTEs for mapping hugetlb pages -- 
where vm_normal_folio_pmd() would be the right thing to do.

That's also the reason why hugetlb.c has not a single user of 
vm_normal_page() and friends ... it doesn't apply to hugetlb, but likely 
also isn't currently harmful to use it.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ