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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250216170748.2258-2-linmag7@gmail.com>
Date: Sun, 16 Feb 2025 18:04:53 +0100
From: Magnus Lindholm <linmag7@...il.com>
To: linmag7@...il.com,
	richard.henderson@...aro.org,
	mattst88@...il.com,
	glaubitz@...sik.fu-berlin.de,
	ink@...een.parts,
	kees@...nel.org,
	arnd@...db.de,
	linux-kernel@...r.kernel.org,
	linux-alpha@...r.kernel.org
Subject: [PATCH 1/1] alpha: Fix pte_swp_exclusive on alpha

Function pte_swp_exclusive() checks if _PAGE_SWP_EXCLUSIVE bit is set in
PTE but returns lower 32-bits only. Shift bits right by 32 to return upper
32-bits of PTE which contain the _PAGE_SWP_EXCLUSIVE bit. On alpha this is
bit 39 but on most other architectures this bit already resides somewhere
in the first 32-bits and hence a shift is not necessary on those archs.

---
 arch/alpha/include/asm/pgtable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index 02e8817a8921..a96d652629fd 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -336,7 +336,7 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
 
 static inline int pte_swp_exclusive(pte_t pte)
 {
-	return pte_val(pte) & _PAGE_SWP_EXCLUSIVE;
+	return (pte_val(pte) & _PAGE_SWP_EXCLUSIVE)>>32;
 }
 
 static inline pte_t pte_swp_mkexclusive(pte_t pte)
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ