]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: vdso: Drop LBASE_VDSO
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Thu, 10 Oct 2024 07:01:06 +0000 (09:01 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 2 Nov 2024 11:37:33 +0000 (12:37 +0100)
This constant is always "0", providing no value and making the logic
harder to understand.
Also prepare for a consolidation of the vdso linkerscript logic by
aligning it with other architectures.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-4-b64f0842d512@linutronix.de
arch/arm64/include/asm/vdso.h
arch/arm64/kernel/vdso/vdso.lds.S
arch/arm64/kernel/vdso32/vdso.lds.S

index 4305995c8f82f416e6ce11280ac1dd19fbe25eec..3e3c3fdb184274abd20647335b19e81e709506db 100644 (file)
@@ -5,13 +5,6 @@
 #ifndef __ASM_VDSO_H
 #define __ASM_VDSO_H
 
-/*
- * Default link address for the vDSO.
- * Since we randomise the VDSO mapping, there's little point in trying
- * to prelink this.
- */
-#define VDSO_LBASE     0x0
-
 #define __VVAR_PAGES    2
 
 #ifndef __ASSEMBLY__
@@ -20,7 +13,7 @@
 
 #define VDSO_SYMBOL(base, name)                                                   \
 ({                                                                        \
-       (void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
+       (void *)(vdso_offset_##name + (unsigned long)(base)); \
 })
 
 extern char vdso_start[], vdso_end[];
index f204a9ddc83359fcbe87f24171389bb64e7adceb..4ec32e86a8da22d5e2315e55ae2e86ec8e7f5f9a 100644 (file)
@@ -25,7 +25,7 @@ SECTIONS
 #ifdef CONFIG_TIME_NS
        PROVIDE(_timens_data = _vdso_data + PAGE_SIZE);
 #endif
-       . = VDSO_LBASE + SIZEOF_HEADERS;
+       . = SIZEOF_HEADERS;
 
        .hash           : { *(.hash) }                  :text
        .gnu.hash       : { *(.gnu.hash) }
index 8d95d7d35057d27835dcd0643bb6a40adfcd8d5b..732702a187e9e8b62972ee0aad75c23568e5e779 100644 (file)
@@ -22,7 +22,7 @@ SECTIONS
 #ifdef CONFIG_TIME_NS
        PROVIDE_HIDDEN(_timens_data = _vdso_data + PAGE_SIZE);
 #endif
-       . = VDSO_LBASE + SIZEOF_HEADERS;
+       . = SIZEOF_HEADERS;
 
        .hash           : { *(.hash) }                  :text
        .gnu.hash       : { *(.gnu.hash) }