Skip to content

Commit 625a90b

Browse files
yong-xuangregkh
authored andcommitted
riscv: signal: fix signal frame size
commit aa49bc2 upstream. The signal context of certain RISC-V extensions will be appended after struct __riscv_extra_ext_header, which already includes an empty context header. Therefore, there is no need to preserve a separate hdr for the END of signal context. Fixes: 8ee0b41 ("riscv: signal: Add sigcontext save/restore for vector") Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Zong Li <zong.li@sifive.com> Reviewed-by: Andy Chiu <AndybnAC@gmail.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241220083926.19453-2-yongxuan.wang@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ac354e5 commit 625a90b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

arch/riscv/kernel/signal.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ static size_t get_rt_frame_size(bool cal_all)
215215
if (cal_all || riscv_v_vstate_query(task_pt_regs(current)))
216216
total_context_size += riscv_v_sc_size;
217217
}
218-
/*
219-
* Preserved a __riscv_ctx_hdr for END signal context header if an
220-
* extension uses __riscv_extra_ext_header
221-
*/
222-
if (total_context_size)
223-
total_context_size += sizeof(struct __riscv_ctx_hdr);
224218

225219
frame_size += total_context_size;
226220

0 commit comments

Comments
 (0)