mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
User mode tasks compiled with Zicfilp may call indirectly into the vdso (like hwprobe indirect calls). Add support for compiling landing pads into the vdso. Landing pad instructions in the vdso will be no-ops for tasks which have not enabled landing pads. Furthermore, add support for the C sources of the vdso to be compiled with shadow stack and landing pads enabled as well. Landing pad and shadow stack instructions are emitted only when the VDSO_CFI cflags option is defined during compile. Signed-off-by: Jim Shu <[email protected]> Reviewed-by: Zong Li <[email protected]> Signed-off-by: Deepak Gupta <[email protected]> Tested-by: Andreas Korb <[email protected]> # QEMU, custom CVA6 Tested-by: Valentin Haudiquet <[email protected]> Link: https://patch.msgid.link/[email protected] [[email protected]: cleaned up patch description, issues reported by checkpatch] Signed-off-by: Paul Walmsley <[email protected]>
16 lines
369 B
ArmAsm
16 lines
369 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
|
|
* Here we can supply some information useful to userland.
|
|
*/
|
|
|
|
#include <linux/elfnote.h>
|
|
#include <linux/version.h>
|
|
#include <asm/assembler.h>
|
|
|
|
ELFNOTE_START(Linux, 0, "a")
|
|
.long LINUX_VERSION_CODE
|
|
ELFNOTE_END
|
|
|
|
emit_riscv_feature_1_and
|