Re: [PATCH 2/2] s390/vdso: Use symbolic constants for the PHDR permission flags

From: Ilya Leoshkevich

Date: Mon Jul 06 2026 - 13:06:44 EST




On 7/6/26 17:19, Jens Remus wrote:
While at it explicitly specify GNU_EH_FRAME PHDR to be read-only.

Inspired by x86 commit 8717b02b8c03 ("x86/entry/vdso: Include
GNU_PROPERTY and GNU_STACK PHDRs").

Signed-off-by: Jens Remus <jremus@xxxxxxxxxxxxx>
---
arch/s390/kernel/vdso/vdso.lds.S | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/s390/kernel/vdso/vdso.lds.S b/arch/s390/kernel/vdso/vdso.lds.S
index 7bec4de0e8e0..35ea7ede06c0 100644
--- a/arch/s390/kernel/vdso/vdso.lds.S
+++ b/arch/s390/kernel/vdso/vdso.lds.S
@@ -82,12 +82,16 @@ SECTIONS
* We must supply the ELF program headers explicitly to get just one
* PT_LOAD segment, and set the flags explicitly to make segments read-only.
*/
+#define PF_R FLAGS(4)
+#define PF_RW FLAGS(6)

PF_RW seems to be unused
Intel uses it for gnu_stack, which we don't seem to have.


Anyway:

Reviewed-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>