[PATCH 3/3] riscv: alternative: Also patch the compat vDSO

From: Thomas Weißschuh

Date: Tue Jun 30 2026 - 03:44:17 EST


The vDSO for compat processes can also contain alternative entries.

Patch those, too.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
arch/riscv/kernel/alternative.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/riscv/kernel/alternative.c b/arch/riscv/kernel/alternative.c
index 6aba169fb213..c0c9306022c5 100644
--- a/arch/riscv/kernel/alternative.c
+++ b/arch/riscv/kernel/alternative.c
@@ -202,6 +202,11 @@ void __init apply_boot_alternatives(void)
apply_vdso_alternatives(vdso_cfi_start,
__vdso_alternatives_start_cfi_offset,
__vdso_alternatives_end_cfi_offset);
+
+ if (IS_ENABLED(CONFIG_COMPAT))
+ apply_vdso_alternatives(compat_vdso_start,
+ compat__vdso_alternatives_start_offset,
+ compat__vdso_alternatives_end_offset);
}

/*

--
2.55.0