diff mbox series

[v1,3/6] linux-user/loongarch64: Fix setup_extcontext alloc wrong fpu_context size

Message ID 20231010033701.385725-4-gaosong@loongson.cn
State New
Headers show
Series linux-user/loongarch64: Add LSX/LASX sigcontext | expand

Commit Message

Song Gao Oct. 10, 2023, 3:36 a.m. UTC
See:
 https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/signal.c

The alloc size is sizeof(struct target_fpu_context).

Signed-off-by: Song Gao <gaosong@loongson.cn>
---
 linux-user/loongarch64/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Henderson Oct. 28, 2023, 9:18 p.m. UTC | #1
On 10/9/23 20:36, Song Gao wrote:
> See:
>   https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/signal.c
> 
> The alloc size is sizeof(struct target_fpu_context).
> 
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
>   linux-user/loongarch64/signal.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/linux-user/loongarch64/signal.c b/linux-user/loongarch64/signal.c
index 39572c1190..d97aa7db7f 100644
--- a/linux-user/loongarch64/signal.c
+++ b/linux-user/loongarch64/signal.c
@@ -100,7 +100,7 @@  static abi_ptr setup_extcontext(struct extctx_layout *extctx, abi_ptr sp)
     /* For qemu, there is no lazy fp context switch, so fp always present. */
     extctx->flags = SC_USED_FP;
     sp = extframe_alloc(extctx, &extctx->fpu,
-                        sizeof(struct target_rt_sigframe), FPU_CTX_ALIGN, sp);
+                        sizeof(struct target_fpu_context), FPU_CTX_ALIGN, sp);
 
     return sp;
 }