riscv: alternative: Pass vDSO start as parameter to apply_vdso_alternatives()

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ßschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260504-riscv-cfi-vdso-alternative-v1-3-bcdf3d37f62e@linutronix.de
Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
Thomas Weißschuh 2026-05-04 08:30:52 +02:00 committed by Paul Walmsley
parent 4fd6505f18
commit 6386161abb

View File

@ -173,14 +173,14 @@ static void __init_or_module _apply_alternatives(struct alt_entry *begin,
stage);
}
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;
hdr = (Elf_Ehdr *)vdso_start;
hdr = (Elf_Ehdr *)start;
shdr = (void *)hdr + hdr->e_shoff;
alt = find_section(hdr, shdr, ".alternative");
if (!alt)
@ -204,7 +204,7 @@ void __init apply_boot_alternatives(void)
RISCV_ALTERNATIVES_BOOT);
if (IS_ENABLED(CONFIG_MMU))
apply_vdso_alternatives();
apply_vdso_alternatives(vdso_start);
}
/*