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: <189f12fb-a558-41aa-9194-19053c6b350b@arm.com>
Date: Thu, 22 Jan 2026 17:43:09 +0000
From: Muhammad Usama Anjum <usama.anjum@....com>
To: Kevin Brodsky <kevin.brodsky@....com>, linux-mm@...ck.org,
 linux-kselftest@...r.kernel.org
Cc: usama.anjum@....com, linux-kernel@...r.kernel.org,
 Andrew Morton <akpm@...ux-foundation.org>,
 David Hildenbrand <david@...nel.org>, Dev Jain <dev.jain@....com>,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Mark Brown
 <broonie@...nel.org>, Ryan Roberts <ryan.roberts@....com>,
 Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH v3 7/9] selftests/mm: fix faulting-in code in
 pagemap_ioctl test

On 22/01/2026 5:02 pm, Kevin Brodsky wrote:
> One of the pagemap_ioctl tests attempts to fault in pages by
> memcpy()'ing them to an unused buffer. This probably worked
> originally, but since commit 46036188ea1f ("selftests/mm: build with
> -O2") the compiler is free to optimise away that unused buffer and
> the memcpy() with it. As a result there might not be any resident
> page in the mapping and the test may fail.
> 
> We don't need to copy all that memory anyway. Just fault in every
> page.
> 
> While at it also make sure to compute the number of pages once using
> simple integer arithmetic instead of ceilf() and implicit
> conversions.
> 
> Fixes: 46036188ea1f ("selftests/mm: build with -O2")
> Cc: Usama Anjum <Usama.Anjum@....com>
> Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>
> Reviewed-by: Dev Jain <dev.jain@....com>
> Signed-off-by: Kevin Brodsky <kevin.brodsky@....com>
> ---
Reviewed-by: Muhammad Usama Anjum <usama.anjum@....com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ