Skip to contentSkip to conversation

riscv: compat: vdso: Add setup additional pages implementation

PATCH Superseded [email protected] 1 participant 1 message Jan 20, 2022

Subsystems (5)
MIPS RISC-V s390 exec and binfmt +1 more subsystems

v3 of 12 Superseded Latest is v12 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH v3 12/17 riscv: compat: vdso: Add setup additional pages implementation

From: Guo Ren <[email protected]>

Reconstruct __setup_additional_pages() by appending vdso info pointer argument to meet compat_vdso_info requirement. And change vm_special_mapping *dm, *cm initialization into static.

---
 arch/riscv/include/asm/elf.h |   5 ++
 arch/riscv/include/asm/mmu.h |   1 +
 arch/riscv/kernel/vdso.c     | 104 +++++++++++++++++++++++++----------
 3 files changed, 81 insertions(+), 29 deletions(-)
arch/riscv/include/asm/elf.h +5 -0
index 353b4589c79c..c2a7e22637eb 100644
@@ -138,5 +138,10 @@ do {    if ((ex).e_ident[EI_CLASS] == ELFCLASS32)		\
 typedef compat_ulong_t			compat_elf_greg_t;
 typedef compat_elf_greg_t		compat_elf_gregset_t[ELF_NGREG];
 
+extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
+					      int uses_interp);
+#define compat_arch_setup_additional_pages \
+				compat_arch_setup_additional_pages
+
 #endif /* CONFIG_COMPAT */
 #endif /* _ASM_RISCV_ELF_H */
arch/riscv/include/asm/mmu.h +1 -0
index 0099dc116168..cedcf8ea3c76 100644
@@ -16,6 +16,7 @@ typedef struct {
 	atomic_long_t id;
 #endif
 	void *vdso;
+	void *vdso_info;
 #ifdef CONFIG_SMP
 	/* A local icache flush is needed before user execution can resume. */
 	cpumask_t icache_stale_mask;
arch/riscv/kernel/vdso.c +75 -29

212 lines not on this page · raw message

Signature · 1 line
2.25.1