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: <34344793-128c-445b-9ef4-853c98f3d5a8@redhat.com>
Date: Tue, 8 Jul 2025 17:29:21 +0200
From: David Hildenbrand <david@...hat.com>
To: Li Wang <liwang@...hat.com>, akpm@...ux-foundation.org,
 peterx@...hat.com, linux-kselftest@...r.kernel.org, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Cc: Nadav Amit <nadav.amit@...il.com>,
 Aruna Ramakrishna <aruna.ramakrishna@...cle.com>,
 Bagas Sanjaya <bagasdotme@...il.com>,
 Catalin Marinas <catalin.marinas@....com>,
 Dave Hansen <dave.hansen@...ux.intel.com>, Joey Gouly <joey.gouly@....com>,
 Johannes Weiner <hannes@...xchg.org>, Keith Lucas <keith.lucas@...cle.com>,
 Ryan Roberts <ryan.roberts@....com>, Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH v3] selftests/mm: Fix UFFDIO_API usage with proper
 two-step feature negotiation

> Key changes:
> 
> 1. Use features=0 in the initial UFFDIO_API call to query supported
>     feature bits, rather than immediately requesting WP support.
> 
> 2. Skip the test gracefully if:
>     - UFFDIO_API fails with EINVAL (e.g. unsupported API version), or
>     - UFFD_FEATURE_PAGEFAULT_FLAG_WP is not advertised by the kernel.
> 
> 3. Close the initial userfaultfd and create a new one before enabling
>     the required feature, since UFFDIO_API can only be called once per fd.
> 
> 4. Improve diagnostics by distinguishing between expected and unexpected
>     failures, using strerror() to report errors.
> 
> This ensures the test behaves correctly across a wider range of kernel
> versions and configurations, while preserving the intended behavior on
> kernels that support UFFD-WP.
> 
> Suggestted-by: David Hildenbrand <david@...hat.com>

Skimming over this once again ... sorry.

Nit:

"Suggested-by:"

Likely Andrew can fix it up ... if the patch is not upstream yet (did 
not check).

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ