[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250924080119.497867836@infradead.org>
Date: Wed, 24 Sep 2025 09:59:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: jpoimboe@...nel.org,
rostedt@...nel.org
Cc: linux-kernel@...r.kernel.org,
peterz@...radead.org
Subject: [PATCH 10/12] unwind: Simplify unwind_user_next_fp() alignment check
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
kernel/unwind/user.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/kernel/unwind/user.c
+++ b/kernel/unwind/user.c
@@ -19,7 +19,6 @@ static int unwind_user_next_fp(struct un
{
const struct unwind_user_frame *frame = &fp_frame;
unsigned long cfa, fp, ra;
- unsigned int shift;
if (frame->use_fp) {
if (state->fp < state->sp)
@@ -37,8 +36,7 @@ static int unwind_user_next_fp(struct un
return -EINVAL;
/* Make sure that the address is word aligned */
- shift = sizeof(long) == 4 ? 2 : 3;
- if (cfa & ((1 << shift) - 1))
+ if (cfa & (sizeof(long) - 1))
return -EINVAL;
/* Find the Return Address (RA) */
Powered by blists - more mailing lists