Commit c102f076 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/vdso: Replace vdso_base by vdso



All other architectures but s390 use a void pointer named 'vdso'
to reference the VDSO mapping.

In a following patch, the VDSO data page will be put in front of
text, vdso_base will then not anymore point to VDSO text.

To avoid confusion between vdso_base and VDSO text, rename vdso_base
into vdso and make it a void __user *.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8e6cefe474aa4ceba028abb729485cd46c140990.1601197618.git.christophe.leroy@csgroup.eu
parent 526a9c4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ struct hash_pte {

typedef struct {
	unsigned long id;
	unsigned long vdso_base;
	void __user *vdso;
} mm_context_t;

void update_bats(void);
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ typedef struct {

	struct hash_mm_context *hash_context;

	unsigned long vdso_base;
	void __user *vdso;
	/*
	 * pagetable fragment support
	 */
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ do { \
	NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize);			\
	NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize);			\
	NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize);			\
	VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base);	\
	VDSO_AUX_ENT(AT_SYSINFO_EHDR, (unsigned long)current->mm->context.vdso);\
	ARCH_DLINFO_CACHE_GEOMETRY;					\
} while (0)

+4 −2
Original line number Diff line number Diff line
@@ -262,8 +262,10 @@ extern void arch_exit_mmap(struct mm_struct *mm);
static inline void arch_unmap(struct mm_struct *mm,
			      unsigned long start, unsigned long end)
{
	if (start <= mm->context.vdso_base && mm->context.vdso_base < end)
		mm->context.vdso_base = 0;
	unsigned long vdso_base = (unsigned long)mm->context.vdso;

	if (start <= vdso_base && vdso_base < end)
		mm->context.vdso = NULL;
}

#ifdef CONFIG_PPC_MEM_KEYS
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@
typedef struct {
	unsigned int	id;
	unsigned int	active;
	unsigned long	vdso_base;
	void __user	*vdso;
} mm_context_t;

#endif /* !__ASSEMBLY__ */
Loading