From: Alexandre Ghiti <alex@ghiti.fr>
To: Yong-Xuan Wang <yongxuan.wang@sifive.com>,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Cc: greentime.hu@sifive.com, vincent.chen@sifive.com,
AndybnAC@gmail.com, zong.li@sifive.com,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Zhongqiu Han" <quic_zhonhan@quicinc.com>,
"Bjorn Andersson" <quic_bjorande@quicinc.com>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Ben Dooks" <ben.dooks@codethink.co.uk>,
"Heiko Stuebner" <heiko@sntech.de>
Subject: Re: [PATCH v2 1/2] riscv: signal: fix signal frame size
Date: Mon, 6 Jan 2025 15:00:26 +0100 [thread overview]
Message-ID: <f48321fd-e618-4d68-9fb4-5c6b4bf697b6@ghiti.fr> (raw)
In-Reply-To: <20241220083926.19453-2-yongxuan.wang@sifive.com>
Hi Yong-Xuan,
On 20/12/2024 09:39, Yong-Xuan Wang wrote:
> 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: 8ee0b41898fa ("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>
> ---
> arch/riscv/kernel/signal.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
> index dcd282419456..c3c517b9eee5 100644
> --- a/arch/riscv/kernel/signal.c
> +++ b/arch/riscv/kernel/signal.c
> @@ -215,12 +215,6 @@ static size_t get_rt_frame_size(bool cal_all)
> if (cal_all || riscv_v_vstate_query(task_pt_regs(current)))
> total_context_size += riscv_v_sc_size;
> }
> - /*
> - * Preserved a __riscv_ctx_hdr for END signal context header if an
> - * extension uses __riscv_extra_ext_header
> - */
> - if (total_context_size)
> - total_context_size += sizeof(struct __riscv_ctx_hdr);
>
> frame_size += total_context_size;
>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks,
Alex
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-01-06 14:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 8:39 [PATCH v2 0/2] riscv: signal: fix the size of signal frame Yong-Xuan Wang
2024-12-20 8:39 ` [PATCH v2 1/2] riscv: signal: fix signal frame size Yong-Xuan Wang
2025-01-06 14:00 ` Alexandre Ghiti [this message]
2024-12-20 8:39 ` [PATCH v2 2/2] riscv: signal: fix signal_minsigstksz Yong-Xuan Wang
2024-12-20 14:48 ` Andy Chiu
2025-01-06 14:07 ` Alexandre Ghiti
2025-02-13 18:30 ` [PATCH v2 0/2] riscv: signal: fix the size of signal frame patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f48321fd-e618-4d68-9fb4-5c6b4bf697b6@ghiti.fr \
--to=alex@ghiti.fr \
--cc=AndybnAC@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=ben.dooks@codethink.co.uk \
--cc=bjorn@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=greentime.hu@sifive.com \
--cc=heiko@sntech.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=quic_bjorande@quicinc.com \
--cc=quic_zhonhan@quicinc.com \
--cc=vincent.chen@sifive.com \
--cc=yongxuan.wang@sifive.com \
--cc=zong.li@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox