[PATCH 0/3] riscv: alternative: Statically compute alternative section boundaries and patch compat vDSO

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Jun 30 00:41:39 PDT 2026


Currently the alternative sections are extracted from the vDSO
binaries at runtime. This has runtime overhead and also doesn't
work for the compat vDSO.

Extract the offsets of the alternative section during the build with the
existing symbol extraction machinery and use those.

Also add support for the compat vDSO.

Link: https://lore.kernel.org/lkml/cover.1781876501.git.namcao@linutronix.de/
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh at linutronix.de>
---
Thomas Weißschuh (3):
      riscv: vdso: Add symbols for the alternative section boundaries
      riscv: alternative: Use the statically extracted vDSO section offsets
      riscv: alternative: Also patch the compat vDSO

 arch/riscv/include/asm/vdso.h     |  6 ++++++
 arch/riscv/kernel/alternative.c   | 33 ++++++++++++++++-----------------
 arch/riscv/kernel/vdso/vdso.lds.S |  2 ++
 3 files changed, 24 insertions(+), 17 deletions(-)
---
base-commit: 10cd4cf20d3d92532485e3f0384e61abc90d6c54
change-id: 20260626-riscv-vdso32-alternative-9d39250c984a

Best regards,
--  
Thomas Weißschuh (Schneider Electric) <thomas.weissschuh at linutronix.de>




More information about the linux-riscv mailing list