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: <5f829c4198fe72ac71e3e62426e12d475501ae51.1770675272.git.luizcap@redhat.com>
Date: Mon,  9 Feb 2026 17:14:26 -0500
From: Luiz Capitulino <luizcap@...hat.com>
To: linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	david@...nel.org,
	baolin.wang@...ux.alibaba.com
Cc: ryan.roberts@....com,
	akpm@...ux-foundation.org,
	lorenzo.stoakes@...cle.com
Subject: [PATCH v2 04/11] drivers: i915 selftest: use pgtable_has_pmd_leaves()

igt_can_allocate_thp() uses has_transparent_hugepage() to check if THP
is supported with PMD-sized pages. However, has_transparent_hugepage()
is being replaced by an API that has clearer semantics. Thus, replace
has_transparent_hugepage() with pgtable_has_pmd_leaves() and a check for
IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE), this makes the intent of the
check very clear.

Signed-off-by: Luiz Capitulino <luizcap@...hat.com>
---
 drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index bd08605a1611..dcd1f1141513 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1316,7 +1316,9 @@ typedef struct drm_i915_gem_object *
 
 static inline bool igt_can_allocate_thp(struct drm_i915_private *i915)
 {
-	return i915->mm.gemfs && has_transparent_hugepage();
+	return i915->mm.gemfs &&
+		IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&
+		pgtable_has_pmd_leaves();
 }
 
 static struct drm_i915_gem_object *
-- 
2.53.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ