40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
|
|
From e011a861479e486201feb0760a5fd2f449270f4d Mon Sep 17 00:00:00 2001
|
||
|
|
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Thu, 21 Mar 2024 05:38:28 +0000
|
||
|
|
Subject: [PATCH] linux-user/riscv: Align signal frame to 16 bytes mainline
|
||
|
|
inclusion commit 1eaa63429a9944265c92efdb94c02fabb231f564 category: bugfix
|
||
|
|
|
||
|
|
---------------------------------------------------------------
|
||
|
|
|
||
|
|
Follow the kernel's alignment, as we already noted.
|
||
|
|
|
||
|
|
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1093
|
||
|
|
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
||
|
|
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
|
||
|
|
Message-Id: <20220729201942.30738-1-richard.henderson@linaro.org>
|
||
|
|
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
||
|
|
|
||
|
|
Signed-off-by: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
linux-user/riscv/signal.c | 4 +---
|
||
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c
|
||
|
|
index a0f9542ce3..c50ac6d0aa 100644
|
||
|
|
--- a/linux-user/riscv/signal.c
|
||
|
|
+++ b/linux-user/riscv/signal.c
|
||
|
|
@@ -64,9 +64,7 @@ static abi_ulong get_sigframe(struct target_sigaction *ka,
|
||
|
|
|
||
|
|
/* This is the X/Open sanctioned signal stack switching. */
|
||
|
|
sp = target_sigsp(sp, ka) - framesize;
|
||
|
|
-
|
||
|
|
- /* XXX: kernel aligns with 0xf ? */
|
||
|
|
- sp &= ~3UL; /* align sp on 4-byte boundary */
|
||
|
|
+ sp &= ~0xf;
|
||
|
|
|
||
|
|
return sp;
|
||
|
|
}
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|