From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9B651DE4E6 for ; Mon, 6 Jan 2025 14:00:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736172040; cv=none; b=qC8Y23QX0lH/iXJAuHui25JbCiACAvwSiElT3xQEOQwE3cIiVJ866lTcVCJDqDTtQyfaH/mhKfti3/YkmkIOwqFO5KdcKdH7/bLLANaEemCK/mvHE6skKBgOwhllh27GSGCDg8eVercnkcn99zsrO+0NnlG3U3QVk87YD5v3J50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736172040; c=relaxed/simple; bh=7efATRsS4hdo9M+EXE9b6lBB4bCvqoMrWA8dNIo0FS4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aI0KhG9PhhSr2Y6C0a/9Qy6qFWGpY2fbArb7tAL3aRWQJWIKUn9ZKlORizDwRtFXF3uA99DSRtHSlTEQQ8gZeydH0IWiqZZmY6BZGFYmSZYxHCSjZWizY84nBKakR6WILX+BzqBnBEoZeIcx3bUpFHSFXIzjVNaCCp/dE8F027g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 5D5AB20003; Mon, 6 Jan 2025 14:00:27 +0000 (UTC) Message-ID: Date: Mon, 6 Jan 2025 15:00:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] riscv: signal: fix signal frame size Content-Language: en-US To: Yong-Xuan Wang , 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 , Palmer Dabbelt , Albert Ou , Conor Dooley , Zhongqiu Han , Bjorn Andersson , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Ben Dooks , Heiko Stuebner References: <20241220083926.19453-1-yongxuan.wang@sifive.com> <20241220083926.19453-2-yongxuan.wang@sifive.com> From: Alexandre Ghiti In-Reply-To: <20241220083926.19453-2-yongxuan.wang@sifive.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr 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 > Reviewed-by: Zong Li > Reviewed-by: Andy Chiu > --- > 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 Thanks, Alex