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: <176597508229.510.343703398295362146.tip-bot2@tip-bot2>
Date: Wed, 17 Dec 2025 12:38:02 -0000
From: "tip-bot2 for Jens Remus" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
 Jens Remus <jremus@...ux.ibm.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: perf/core] x86/unwind_user: Simplify unwind_user_word_size()

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     3c48808408af11d6f173c65eee9bd5ca4c53667c
Gitweb:        https://git.kernel.org/tip/3c48808408af11d6f173c65eee9bd5ca4c53667c
Author:        Jens Remus <jremus@...ux.ibm.com>
AuthorDate:    Mon, 08 Dec 2025 17:03:52 +01:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Wed, 17 Dec 2025 13:31:08 +01:00

x86/unwind_user: Simplify unwind_user_word_size()

Get rid of superfluous ifdef and return explicit word size depending on
32-bit or 64-bit mode.

Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Jens Remus <jremus@...ux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://patch.msgid.link/20251208160352.1363040-5-jremus@linux.ibm.com
---
 arch/x86/include/asm/unwind_user.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/unwind_user.h b/arch/x86/include/asm/unwind_user.h
index 7f1229b..6e46904 100644
--- a/arch/x86/include/asm/unwind_user.h
+++ b/arch/x86/include/asm/unwind_user.h
@@ -12,11 +12,7 @@ static inline int unwind_user_word_size(struct pt_regs *regs)
 	/* We can't unwind VM86 stacks */
 	if (regs->flags & X86_VM_MASK)
 		return 0;
-#ifdef CONFIG_X86_64
-	if (!user_64bit_mode(regs))
-		return sizeof(int);
-#endif
-	return sizeof(long);
+	return user_64bit_mode(regs) ? 8 : 4;
 }
 
 #endif /* CONFIG_UNWIND_USER */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ