Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/vdso: Move vdso symbol handling to separate header file

The vdso.h header file, which is included at many places, includes
generated header files. This can easily lead to recursive header file
inclusions if the vdso code is changed.

Therefore move the vdso symbol code, which requires the generated
header files, to a separate header file, and include it at the two
locations which require it.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

authored by

Heiko Carstens and committed by
Jason A. Donenfeld
c1ae1b4e e10863ff

+19 -14
+17
arch/s390/include/asm/vdso-symbols.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __S390_VDSO_SYMBOLS_H__ 3 + #define __S390_VDSO_SYMBOLS_H__ 4 + 5 + #include <generated/vdso64-offsets.h> 6 + #ifdef CONFIG_COMPAT 7 + #include <generated/vdso32-offsets.h> 8 + #endif 9 + 10 + #define VDSO64_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso64_offset_##name)) 11 + #ifdef CONFIG_COMPAT 12 + #define VDSO32_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso32_offset_##name)) 13 + #else 14 + #define VDSO32_SYMBOL(tsk, name) (-1UL) 15 + #endif 16 + 17 + #endif /* __S390_VDSO_SYMBOLS_H__ */
-12
arch/s390/include/asm/vdso.h
··· 6 6 7 7 #ifndef __ASSEMBLY__ 8 8 9 - #include <generated/vdso64-offsets.h> 10 - #ifdef CONFIG_COMPAT 11 - #include <generated/vdso32-offsets.h> 12 - #endif 13 - 14 - #define VDSO64_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso64_offset_##name)) 15 - #ifdef CONFIG_COMPAT 16 - #define VDSO32_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso32_offset_##name)) 17 - #else 18 - #define VDSO32_SYMBOL(tsk, name) (-1UL) 19 - #endif 20 - 21 9 extern struct vdso_data *vdso_data; 22 10 23 11 int vdso_getcpu_init(void);
+1 -1
arch/s390/kernel/compat_signal.c
··· 24 24 #include <linux/tty.h> 25 25 #include <linux/personality.h> 26 26 #include <linux/binfmts.h> 27 + #include <asm/vdso-symbols.h> 27 28 #include <asm/access-regs.h> 28 29 #include <asm/ucontext.h> 29 30 #include <linux/uaccess.h> 30 31 #include <asm/lowcore.h> 31 - #include <asm/vdso.h> 32 32 #include <asm/fpu.h> 33 33 #include "compat_linux.h" 34 34 #include "compat_ptrace.h"
+1 -1
arch/s390/kernel/signal.c
··· 30 30 #include <linux/compat.h> 31 31 #include <asm/ucontext.h> 32 32 #include <linux/uaccess.h> 33 + #include <asm/vdso-symbols.h> 33 34 #include <asm/access-regs.h> 34 35 #include <asm/lowcore.h> 35 - #include <asm/vdso.h> 36 36 #include "entry.h" 37 37 38 38 /*