From nobody Sun Jun 14 04:20:58 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 2192520C029 for ; Mon, 4 May 2026 06:30:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876256; cv=none; b=onKqsXeGHsgk768ahdhUMMNnrsADa9ZdgZ1nKcDZs+0lFCHl+nLjkic6e9DtnpZEiXzu2WwHOB6xq9sjuStHEO7SJP1/ossYZs+b/7E4re57OBrjbfFNVYerphIFTUp2TMnp0rX1q5PnTMzHN977k05ZEUaFORhyubZveeVNsoo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876256; c=relaxed/simple; bh=htyRRoioe7Aoq1pGRxfhfTU6MI/RNQ7IjDr/3IUj8fs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jYdDcf5GUhqzqsjI4lXbHQr8PqXuZTPE5Vc0eMSilu9b7vf/hmgZaQhFWL9TZ2sK0Ip9l4ydrGQict27atnF+6qC5sCxCDOLnUNiebA/3Pp5y96z5SsexmyT4oyCweUkzNiOOnNPYx79bQtdy3W4UIeOs64lXZ2F8hqsYrhaARI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AGzFisOq; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LCqwB8r5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AGzFisOq"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LCqwB8r5" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777876253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rM5HDftepo4kXxhHSXZ92H6di30GeM3aO/jbh6miHc4=; b=AGzFisOqGXEmf7uSwvmZCUgmZfhT/LUMDwf3BG1oocH+FLGdxEQqfyMa9N32xPQePmoJuy 8Vt1GlslDQJJ97XuqlEtUFUnB/RNBJRo9F23VLU2P28GxTZdpd7pqx/Z/FNWdhaVjTNGCP 7odv2NLoStzLA/zGaRWdZLWpV9JHzsqSQoLWonD2cMADm579u/NSsA+7T3ir+GLqzfNbet f1fAZBfHmRl/lXjw1N3vSfjl4wWsdbctN5K+Gsjvh8BJXrNlPLAKwdDIKzimOX/vFu3Udp 4N0WkObh9GlqgCg3uEaoWgTxMMQd7NYEv2JTIwOX09OYjyS9K87lyBFLjQdDrQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777876253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rM5HDftepo4kXxhHSXZ92H6di30GeM3aO/jbh6miHc4=; b=LCqwB8r54TSG1K6DmPYt38JI1IN/kXhk3gI3FUAQ4dZK8eguNzRePA635Jzk/P96r89NvO z/if1dfT5C50LEDw== Date: Mon, 04 May 2026 08:30:50 +0200 Subject: [PATCH 1/4] riscv: vdso: Always declare vdso_start symbols Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260504-riscv-cfi-vdso-alternative-v1-1-bcdf3d37f62e@linutronix.de> References: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> In-Reply-To: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Deepak Gupta , Charles Mirabile Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Nam Cao , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1777876252; l=1436; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=htyRRoioe7Aoq1pGRxfhfTU6MI/RNQ7IjDr/3IUj8fs=; b=tH3IO57JItOobgL9kkBG6D2wncyWpa11AXMYzCzRFJ5FGltmlUF824HpRMK3/abE/F3kKEkh4 eMaHJqLO9bTC3gHdYuV+GIBuXHefxABFL4XGxY20kFen+PUtmEmkPoE X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Make the declarations of vdso_start and its related symbols always visible. With that their users don't have to use ifdeffery but can use the better IS_ENABLED() compile-time checks. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/riscv/include/asm/vdso.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/riscv/include/asm/vdso.h b/arch/riscv/include/asm/vdso.h index 35bf830a5576..f7998d9ad9b2 100644 --- a/arch/riscv/include/asm/vdso.h +++ b/arch/riscv/include/asm/vdso.h @@ -12,12 +12,15 @@ * All systems with an MMU have a VDSO, but systems without an MMU don't * support shared libraries and therefore don't have one. */ -#ifdef CONFIG_MMU =20 #define __VDSO_PAGES 4 =20 #ifndef __ASSEMBLER__ + +#ifdef CONFIG_MMU #include +#endif + #ifdef CONFIG_RISCV_USER_CFI #include #endif @@ -38,15 +41,12 @@ #define COMPAT_VDSO_SYMBOL(base, name) \ (void __user *)((unsigned long)(base) + compat__vdso_##name##_offset) =20 -extern char compat_vdso_start[], compat_vdso_end[]; - #endif /* CONFIG_COMPAT */ =20 extern char vdso_start[], vdso_end[]; extern char vdso_cfi_start[], vdso_cfi_end[]; +extern char compat_vdso_start[], compat_vdso_end[]; =20 #endif /* !__ASSEMBLER__ */ =20 -#endif /* CONFIG_MMU */ - #endif /* _ASM_RISCV_VDSO_H */ --=20 2.53.0 From nobody Sun Jun 14 04:20:58 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 76D3825F984 for ; Mon, 4 May 2026 06:30:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876256; cv=none; b=E3Z5Zo67JpmAQEo434rqtVFfi47UItrXDwP/QcpvKZ5/oX7QqGD//fMvQMa3glgcGaBSw9fNbgA04/BiVyh0QcjFJIOIrQRHQVuUGLgMq0dX0owjyXTFdnotp3stZRuxYNHTAZGbsN8onj+EGpJWlTlacpgPuHseH8Gc6bZI6sQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876256; c=relaxed/simple; bh=u4J2HYBRH4KXYLD1ESLAFUbGfh/AXVZFwRcCbM3mVw0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N9mLxEyvpJ73UJeyfWrBXa58lSnrIsD+FOY/jKVDmOvM6M5hWhRRoCVeFqoZyGNfQ2WpRQENIkrIcGjhLxyU8X5VWJINwSJY2DPMEm8CzMF+fqxZjZLnAfmpljMfhcsvnypxAZdZ71VFnPJpAMc/89FJB6ibYQT6I7aRocUN2w4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PgnPOXrt; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=7rgGhfpx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PgnPOXrt"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7rgGhfpx" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777876254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w0ZhpEesyPcJsgXO4/btUK0FfWLbWwsk83ByeRkFbmE=; b=PgnPOXrtRlkvLCjQZ0dF3+Jb1AmeioRewTWiCABYyCe2dnmYMQC1q+UIoMLiuS8FoqwYj8 bMOs3A5/s/D53ZKjVkfLQTS4+f8GOyPyrene1kGmj5VsizyWHoOYrRPFaDgCH95rOd2NBW Ew30v1kg88kRuwVXKM6kIkLqhQzG/CSU7/wbJWK6CQL/DK+uffWgEUC00742UitDOx+x0a f6CGc2QRu/W9gP8J2xsOE31IICDubMQBVNtrR9JGSNExcVyu+W8ghEqWlsHw4JMghmUYS4 t8fmI8Vz3pT5h7jKVNGoxbgGcnM/EPmKRWKixqTTt1Qh8bzSKaY+3oSV7fU19w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777876254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w0ZhpEesyPcJsgXO4/btUK0FfWLbWwsk83ByeRkFbmE=; b=7rgGhfpxgLu1TZjWu6caUXMQhDkMDRYDPpcSdnCzib0LqTlb6s1Cz4VhGkybnnTRK6tDu+ g20Mg00/Scs34MCg== Date: Mon, 04 May 2026 08:30:51 +0200 Subject: [PATCH 2/4] riscv: alternative: Use IS_ENABLED() over ifdeffery for apply_vdso_alternatives() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260504-riscv-cfi-vdso-alternative-v1-2-bcdf3d37f62e@linutronix.de> References: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> In-Reply-To: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Deepak Gupta , Charles Mirabile Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Nam Cao , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1777876252; l=1258; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=u4J2HYBRH4KXYLD1ESLAFUbGfh/AXVZFwRcCbM3mVw0=; b=iqIHKQOWMj8uM7SjPXzupq7o2IlDKeimiPSojWcUb6MarpHOBeCpz+LzfbOkdAQqqxej1sKQi eqKfoOl5YpZDNqaqta/jT4exkBXoycT2mGPpiL5exBszaJSW6ddD5zF X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= IS_ENABLED() allows better compilation coverage while still optimizing away all the dead code. Also it will make some upcoming changes easier. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/riscv/kernel/alternative.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/riscv/kernel/alternative.c b/arch/riscv/kernel/alternativ= e.c index 7642704c7f18..59991922a5dc 100644 --- a/arch/riscv/kernel/alternative.c +++ b/arch/riscv/kernel/alternative.c @@ -173,7 +173,6 @@ static void __init_or_module _apply_alternatives(struct= alt_entry *begin, stage); } =20 -#ifdef CONFIG_MMU static void __init apply_vdso_alternatives(void) { const Elf_Ehdr *hdr; @@ -194,9 +193,6 @@ static void __init apply_vdso_alternatives(void) (struct alt_entry *)end, RISCV_ALTERNATIVES_BOOT); } -#else -static void __init apply_vdso_alternatives(void) { } -#endif =20 void __init apply_boot_alternatives(void) { @@ -207,7 +203,8 @@ void __init apply_boot_alternatives(void) (struct alt_entry *)__alt_end, RISCV_ALTERNATIVES_BOOT); =20 - apply_vdso_alternatives(); + if (IS_ENABLED(CONFIG_MMU)) + apply_vdso_alternatives(); } =20 /* --=20 2.53.0 From nobody Sun Jun 14 04:20:58 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 E4CC329CB24 for ; Mon, 4 May 2026 06:30:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876257; cv=none; b=JlHi7OR0PVYWytzeRHr3JrlmZbx/ECU1sRKfxlkXdK437nAowxhC7CJGFMMv2c2YJOtwKTdXLET+MtT2/x1BIdqdWi8xVjiDbfcx1GN+ES2c/esMYPt3BiSPAhlv3TagogSVTStnJWD2TxTN29ptp31/TRXwX0Hka9Kc679ecGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876257; c=relaxed/simple; bh=NkHskHfcD+h8kwIJGRZUJM+Hef1z+xA5FI6fINNrnuQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UdkQWWj4c/bF08rBsvPyL7GYx5bTlX4TtHGXlLNpS1X01mL4ujCaWpC+GCn157oykku2VkzZykSgtuNr8Olknq3CacIFPyIOvaWYZ8YmHAVQpxibWKYiY4ub5NwMJAVkMMWbwDbHqiKryUAZFLeWYkXwo//aqDTt9zH0fU3ssu8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rNDXXHfu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lIUDwsWh; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rNDXXHfu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lIUDwsWh" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777876254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RKchW4RD6tdsnYFxHaOToD998yGVT9C9zWr8sRBK/VY=; b=rNDXXHfuwWCL2tvNY/gJEosIP/cieM22xE/nHpXULWsfmAXk4K/WO3WDLtV+bBN27Y8wzk xOT4OO63S1SjolHV5VUkIGkn7kgw5uK8rorY+KhTvRIuAzVlICjPfVGASBH+lej7dFK73x nOHIniONEJHkg3qsLxiWT0Sy7vudRTBqgXPbP6vIHSVTobCGLrdUL1Xj1DlKJBRtnBtkNh i3rvmOk6CPi7AEN0skxG1coBir3xwROTS3yBCmf4EV8VM/pSQRe9mrLMdE2O6/3FgnRv2z BLt++3FF9EV9GCifphJaOt5yufI3q2i36GZ+aoXXfsNGQckVMKnpEarCyMaBZQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777876254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RKchW4RD6tdsnYFxHaOToD998yGVT9C9zWr8sRBK/VY=; b=lIUDwsWh/05A04lbEgbojqgIoxnjWMhEGbFXSGmHbrX7qAXsBiEgJqW3CBFTvMO9R8uwmv jlaVeSk9HII4MUAg== Date: Mon, 04 May 2026 08:30:52 +0200 Subject: [PATCH 3/4] riscv: alternative: Pass vDSO start as parameter to apply_vdso_alternatives() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260504-riscv-cfi-vdso-alternative-v1-3-bcdf3d37f62e@linutronix.de> References: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> In-Reply-To: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Deepak Gupta , Charles Mirabile Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Nam Cao , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1777876252; l=1261; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=NkHskHfcD+h8kwIJGRZUJM+Hef1z+xA5FI6fINNrnuQ=; b=QXzEBgNd1H7lfBdviP7HUi7cChf3oa03Huh2/VKmG8aGTfM1rzEsWce+apoTyrbqEXpdL6hhI lMIfJL1GArjAEEE2573JdFzPtLHZvgekT4copplefox7ROkitBgXFs3 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The dedicated vDSO with CFI should also be patched in the same way. To prepare for that move the currently hardcoded vDSO start symbol into a parameter. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/riscv/kernel/alternative.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/kernel/alternative.c b/arch/riscv/kernel/alternativ= e.c index 59991922a5dc..89c283a5cec7 100644 --- a/arch/riscv/kernel/alternative.c +++ b/arch/riscv/kernel/alternative.c @@ -173,14 +173,14 @@ static void __init_or_module _apply_alternatives(stru= ct alt_entry *begin, stage); } =20 -static void __init apply_vdso_alternatives(void) +static void __init apply_vdso_alternatives(void *start) { const Elf_Ehdr *hdr; const Elf_Shdr *shdr; const Elf_Shdr *alt; struct alt_entry *begin, *end; =20 - hdr =3D (Elf_Ehdr *)vdso_start; + hdr =3D (Elf_Ehdr *)start; shdr =3D (void *)hdr + hdr->e_shoff; alt =3D find_section(hdr, shdr, ".alternative"); if (!alt) @@ -204,7 +204,7 @@ void __init apply_boot_alternatives(void) RISCV_ALTERNATIVES_BOOT); =20 if (IS_ENABLED(CONFIG_MMU)) - apply_vdso_alternatives(); + apply_vdso_alternatives(vdso_start); } =20 /* --=20 2.53.0 From nobody Sun Jun 14 04:20:58 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 7D3BE2BEC34 for ; Mon, 4 May 2026 06:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876257; cv=none; b=BEGunQ+sZPeIA+y3x2BTpRC/PLd/3x8nkIu6ngCoP/vQSY/izAIbDVmXmpt6Q2Pe7FObjuyQI3245CAuVpfYDbtO02WyOPEK3LgQfNnAIRZYyuPipJR8Aphu3o28iqtwuLXStuAxeoumLFRAAuHIxGvLev0khLeJLgpUNTvXpag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777876257; c=relaxed/simple; bh=Do5fKZU2bln4bc8zh+us/vSp4w75v9ClWSIbr9FVOQU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gcz5NCxMA+WH8fMEE7H+MXwRIMYtWuXKn9Hm2IFe30zzAs2IU7BOj60DPNSb2Mob7M5jLabiVgkQo75nZRzH0kB45zcjxriSzzA/ofkbD1ONtwX98Jv6qs8PDbYkJnNbapcO2NH5SK4bnJgunz+UpKlI7PCo8m0AngthbCKcIIE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BhX9HGYm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YcdqAtzL; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BhX9HGYm"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YcdqAtzL" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777876255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IpXuDy/BAVZk2qCTwlweC6tduAoqiaSv5XotfzVf0l4=; b=BhX9HGYmJKpHiA3q7zk+ZziJnQEyuNJLA9KupmknfEZddUrjugJSiIwSpHfzBDStF6qIst GvroyAG7Gu10oLgF76Japyc0l257fNyaWT0RXrk3RQxXaDvieBb/D42PtEL6u+uEIl3J6l sRhVuXxnYetOIizoJB3/jb7dXowR61nJT+xxq4z0nwPsLyGm9vsCCz/sWnGmiimiHEMTrM Mb1PZGFdwO1iHdGjIHiYsCEU4xQRdom+AM/XIC06ok9rsHjHmjA9562hemS0bo/Tnc6i+d pOAAi+dHKGGYDdKgHWUL3euyEl3Nva12ebh/LlBmNb4QE0rkjEkdqZ1KZq5ehQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777876255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IpXuDy/BAVZk2qCTwlweC6tduAoqiaSv5XotfzVf0l4=; b=YcdqAtzLgrWyejmcixfgwN7CQ7rUQwcGh7zmnmYitXk6heTE3IyuwnxxSTHfUUywkE3Py9 49dJXglb6aYKs4CQ== Date: Mon, 04 May 2026 08:30:53 +0200 Subject: [PATCH 4/4] riscv: alternative: Also patch the CFI vDSO Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260504-riscv-cfi-vdso-alternative-v1-4-bcdf3d37f62e@linutronix.de> References: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> In-Reply-To: <20260504-riscv-cfi-vdso-alternative-v1-0-bcdf3d37f62e@linutronix.de> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Deepak Gupta , Charles Mirabile Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Nam Cao , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1777876252; l=807; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Do5fKZU2bln4bc8zh+us/vSp4w75v9ClWSIbr9FVOQU=; b=5Lu0bjK+r16rXf4ydnhC5v/B9bUJ0Unhv5cdt76ZEt9dGs8b42xlhESSSfKqd/mGlXwj4uXPd KvSmAAH1LEYAuGMd9yGXhLI33kQLqZHF6FK/yQJVUNlntqntk65at5U X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The dedicated vDSO for CFI-enabled userspace can also contain alternative entries. Patch those, too. Fixes: ccad8c1336b6 ("arch/riscv: add dual vdso creation logic and select v= dso based on hw") Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/riscv/kernel/alternative.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/kernel/alternative.c b/arch/riscv/kernel/alternativ= e.c index 89c283a5cec7..104dc0862c5c 100644 --- a/arch/riscv/kernel/alternative.c +++ b/arch/riscv/kernel/alternative.c @@ -205,6 +205,9 @@ void __init apply_boot_alternatives(void) =20 if (IS_ENABLED(CONFIG_MMU)) apply_vdso_alternatives(vdso_start); + + if (IS_ENABLED(CONFIG_RISCV_USER_CFI)) + apply_vdso_alternatives(vdso_cfi_start); } =20 /* --=20 2.53.0