From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 92E445474C for ; Mon, 6 Jan 2025 14:07:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736172468; cv=none; b=GMxW7yMhYK/nV8SpGy5v9B434FoxFr19dvXC7EL6Ngquf5Llc8VnrpeHllfs4uN/NTQnbX7Gp7SDEREQQp9+TCu9ELblpb71I3tGzgTJlGp/8u4OlTz/xrXK9xQlP0gWzp+uwv7veUEm8FYqVtSMMRg6mtnMZb2BmURZGDkNsAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736172468; c=relaxed/simple; bh=56JcEtgTKL9YMFjgM2ybhZGmEXhQzyrQbNBFiLHj2Jw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ur0l67nYorvtV1Dog6I4kZI4u0tUSXbl2zGCKL4IVjAXep9dB8dWnG1/Cvv8K10fHuytEw7MDvB6P98/W2RUg5tH9zhMJoeiON5hUzYxhdIPS+NdoQDC6bbA9+Z3zNxMaPHeuWXRPgO84xUl1aexEDmNXsP8aTtwbz5nVuz699A= 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.199 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 F154DFF803; Mon, 6 Jan 2025 14:07:41 +0000 (UTC) Message-ID: Date: Mon, 6 Jan 2025 15:07:41 +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 2/2] riscv: signal: fix signal_minsigstksz 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 , Haibo Xu , Conor Dooley , Usama Arif , Hanjun Guo , Samuel Holland , Alexandre Ghiti , Heiko Stuebner , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= References: <20241220083926.19453-1-yongxuan.wang@sifive.com> <20241220083926.19453-3-yongxuan.wang@sifive.com> From: Alexandre Ghiti In-Reply-To: <20241220083926.19453-3-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 init_rt_signal_env() funciton is called before the alternative patch > is applied, so using the alternative-related API to check the availability > of an extension within this function doesn't have the intended effect. > This patch reorders the init_rt_signal_env() and apply_boot_alternatives() > to get the correct signal_minsigstksz. > > Fixes: e92f469b0771 ("riscv: signal: Report signal frame size to userspace via auxv") > Signed-off-by: Yong-Xuan Wang > Reviewed-by: Zong Li > --- > arch/riscv/kernel/setup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c > index 016b48fcd6f2..b7c91f546453 100644 > --- a/arch/riscv/kernel/setup.c > +++ b/arch/riscv/kernel/setup.c > @@ -324,8 +324,8 @@ void __init setup_arch(char **cmdline_p) > > riscv_init_cbo_blocksizes(); > riscv_fill_hwcap(); > - init_rt_signal_env(); > apply_boot_alternatives(); > + init_rt_signal_env(); > > if (IS_ENABLED(CONFIG_RISCV_ISA_ZICBOM) && > riscv_isa_extension_available(NULL, ZICBOM)) Reviewed-by: Alexandre Ghiti Thanks for your fixes! Alex