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-next>] [day] [month] [year] [list]
Message-Id: <20240228085824.74639-1-dawei.li@shingroup.cn>
Date: Wed, 28 Feb 2024 16:58:24 +0800
From: Dawei Li <dawei.li@...ngroup.cn>
To: geert@...ux-m68k.org
Cc: gerg@...pgear.com,
	linux-m68k@...ts.linux-m68k.org,
	linux-kernel@...r.kernel.org,
	set_pte_at@...look.com,
	Dawei Li <dawei.li@...ngroup.cn>,
	stable@...r.kernel.org
Subject: [PATCH] mk68k: Fix broken THREAD_SIZE_ORDER

Current THREAD_SIZE_ORDER implementation for m68k is incorrect, fix it
by ilog2().

Fixes: cddafa3500fd ("m68k/m68knommu: merge MMU and non-MMU thread_info.h")
Signed-off-by: Dawei Li <dawei.li@...ngroup.cn>
Cc: stable@...r.kernel.org
---
 arch/m68k/include/asm/thread_info.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h
index 31be2ad999ca..50faecd6fc5f 100644
--- a/arch/m68k/include/asm/thread_info.h
+++ b/arch/m68k/include/asm/thread_info.h
@@ -19,7 +19,8 @@
 #else
 #define THREAD_SIZE	PAGE_SIZE
 #endif
-#define THREAD_SIZE_ORDER	((THREAD_SIZE / PAGE_SIZE) - 1)
+
+#define THREAD_SIZE_ORDER	ilog2(THREAD_SIZE / PAGE_SIZE)
 
 #ifndef __ASSEMBLY__
 
-- 
2.27.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ