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: <CALkFLLJP7J7fUsUuo2TYseeDd+4JeC8pqJN9PwfhKFS3jd-TFQ@mail.gmail.com>
Date: Mon, 17 Nov 2025 23:01:22 +0530
From: Ujwal Kundur <ujwal.kundur@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "David Hildenbrand (Red Hat)" <david@...nel.org>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, 
	Carlos Llamas <cmllamas@...gle.com>, Peter Xu <peterx@...hat.com>, 
	"Liam R. Howlett" <Liam.Howlett@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, 
	Mike Rapoport <rppt@...nel.org>, Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>, 
	Shuah Khan <shuah@...nel.org>, Brendan Jackman <jackmanb@...gle.com>, kernel-team@...roid.com, 
	linux-kernel@...r.kernel.org, stable@...r.kernel.org, 
	"open list:MEMORY MANAGEMENT - USERFAULTFD" <linux-mm@...ck.org>, 
	"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH] selftests/mm: fix division-by-zero in uffd-unit-tests

> Commit 4dfd4bba8578 ("selftests/mm/uffd: refactor non-composite global
> vars into struct") moved some of the operations previously implemented
> in uffd_setup_environment() earlier in the main test loop.

> The calculation of nr_pages, which involves a division by page_size, now
> occurs before checking that default_huge_page_size() returns a non-zero
> This leads to a division-by-zero error on systems with !CONFIG_HUGETLB.

> Fix this by relocating the non-zero page_size check before the nr_pages
> calculation, as it was originally implemented.

Thanks for the fix! I never tested with CONFIG_HUGETLB turned off. We
now need tests for tests :)

Reviewed-by: Ujwal Kundur <ujwal.kundur@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ