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] [day] [month] [year] [list]
Message-ID: <26d65dc4-7594-4a5e-8c3d-9e19540ae25e@arm.com>
Date: Tue, 1 Jul 2025 09:46:20 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: Matthew Wilcox <willy@...radead.org>, David Hildenbrand
 <david@...hat.com>, 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 10:17 PM, 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>

LGTM

Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ