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: <5e878654-e00e-4782-bb99-b460a93dd6ab@redhat.com>
Date: Mon, 30 Jun 2025 21:59:33 +0200
From: David Hildenbrand <david@...hat.com>
To: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Anshuman Khandual <anshuman.khandual@....com>
Cc: Matthew Wilcox <willy@...radead.org>, LKML
 <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
 linux-s390 <linux-s390@...r.kernel.org>
Subject: Re: [PATCH] mm/debug_vm_pgtable: Use a swp_entry_t input value for
 swap tests

On 30.06.25 18:47, Gerald Schaefer wrote:
> The various __pte/pmd_to_swp_entry and __swp_entry_to_pte/pmd helper
> functions are expected to operate on swap PTE/PMD entries, not on
> present and mapped entries.
> 
> Reflect this in the swap tests by using a swp_entry_t as input value,
> and convert it to a swap PTE/PMD for testing, similar to how it is already
> done in pte_swap_exclusive_tests(). Move the swap entry creation from
> there to init_args() and store it in args, so it can also be used in other
> functions.
> 
> The pte/pmd_swap_tests() are also changed to compare entries instead of
> pfn values, again similar to pte_swap_exclusive_tests(). pte/pmd_pfn()
> helpers are also not expected to operate on swap PTE/PMD entries at all.
> 
> Also update documentation, to reflect that the helpers operate on swap
> PTE/PMD entries and not present and mapped entries, and use correct names,
> i.e. __swp_to_pte/pmd_entry -> __swp_entry_to_pte/pmd.
> 
> For consistency, also change pte/pmd_swap_soft_dirty_tests() to use
> args->swp_entry instead of a present and mapped PTE/PMD.
> 
> Link: https://lore.kernel.org/all/20250623184321.927418-1-gerald.schaefer@linux.ibm.com
> Signed-off-by: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
> ---

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ