]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/entry/vdso: Include GNU_PROPERTY and GNU_STACK PHDRs
authorH. Peter Anvin <hpa@zytor.com>
Tue, 16 Dec 2025 21:26:01 +0000 (13:26 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 14 Jan 2026 00:37:58 +0000 (16:37 -0800)
commit8717b02b8c030dc0c4b55781b59e88def0a1a92f
treebfa40548fa1b6e10f38fd5819c8336fee25c2655
parent884961618ee51307cc63ab620a0bdd710fa0b0af
x86/entry/vdso: Include GNU_PROPERTY and GNU_STACK PHDRs

Currently the vdso doesn't include .note.gnu.property or a GNU noexec
stack annotation (the -z noexecstack in the linker script is
ineffective because we specify PHDRs explicitly.)

The motivation is that the dynamic linker currently do not check
these.

However, this is a weak excuse: the vdso*.so are also supposed to be
usable at link libraries, and there is no reason why the dynamic
linker might not want or need to check these in the future, so add
them back in -- it is trivial enough.

Use symbolic constants for the PHDR permission flags.

[ v4: drop unrelated formatting changes ]

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/20251216212606.1325678-8-hpa@zytor.com
arch/x86/entry/vdso/common/vdso-layout.lds.S