Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1713ce7c authored by Nathan Lynch's avatar Nathan Lynch Committed by Russell King
Browse files

ARM: 8329/1: miscellaneous vdso infrastructure, preparation



Define the layout of the data structure shared between kernel and
userspace.

Track the vdso address in the mm_context; needed for communicating
AT_SYSINFO_EHDR to the ELF loader.

Add declarations for arm_install_vdso; implementation is in a
following patch.

Define AT_SYSINFO_EHDR, and, if CONFIG_VDSO=y, report the vdso shared
object address via the ELF auxiliary vector.

Note - this adds the AT_SYSINFO_EHDR in a new user-visible header
asm/auxvec.h; this is consistent with other architectures.

Signed-off-by: default avatarNathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c517d838
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line


generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += cputime.h
generic-y += current.h
+1 −0
Original line number Diff line number Diff line
#include <uapi/asm/auxvec.h>
+9 −0
Original line number Diff line number Diff line
#ifndef __ASMARM_ELF_H
#define __ASMARM_ELF_H

#include <asm/auxvec.h>
#include <asm/hwcap.h>
#include <asm/vdso_datapage.h>

/*
 * ELF register definitions..
@@ -130,6 +132,13 @@ extern unsigned long arch_randomize_brk(struct mm_struct *mm);
#define arch_randomize_brk arch_randomize_brk

#ifdef CONFIG_MMU
#ifdef CONFIG_VDSO
#define ARCH_DLINFO						\
do {								\
	NEW_AUX_ENT(AT_SYSINFO_EHDR,				\
		    (elf_addr_t)current->mm->context.vdso);	\
} while (0)
#endif
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
struct linux_binprm;
int arch_setup_additional_pages(struct linux_binprm *, int);
+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ typedef struct {
#endif
	unsigned int	vmalloc_seq;
	unsigned long	sigpage;
#ifdef CONFIG_VDSO
	unsigned long	vdso;
#endif
} mm_context_t;

#ifdef CONFIG_CPU_HAS_ASID
+32 −0
Original line number Diff line number Diff line
#ifndef __ASM_VDSO_H
#define __ASM_VDSO_H

#ifdef __KERNEL__

#ifndef __ASSEMBLY__

struct mm_struct;

#ifdef CONFIG_VDSO

void arm_install_vdso(struct mm_struct *mm, unsigned long addr);

extern char vdso_start, vdso_end;

extern unsigned int vdso_total_pages;

#else /* CONFIG_VDSO */

static inline void arm_install_vdso(struct mm_struct *mm, unsigned long addr)
{
}

#define vdso_total_pages 0

#endif /* CONFIG_VDSO */

#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */

#endif /* __ASM_VDSO_H */
Loading