parisc: Add vDSO support
authorHelge Deller <deller@gmx.de>
Wed, 8 Dec 2021 10:06:52 +0000 (11:06 +0100)
committerHelge Deller <deller@gmx.de>
Fri, 11 Mar 2022 18:49:30 +0000 (19:49 +0100)
commitdf24e1783e6e0eb3dc0e3ba5a8df3bb0cc537408
tree73050ce6de41a1fd03e20bffa47c82fb598ef816
parent14615ecccb8b0022589b7a7841cdfdf96319724b
parisc: Add vDSO support

Add minimal vDSO support, which provides the signal trampoline helpers,
but none of the userspace syscall helpers like time wrappers.

The big benefit of this vDSO implementation is, that we now don't need
an executeable stack any longer. PA-RISC is one of the last
architectures where an executeable stack was needed in oder to implement
the signal trampolines by putting assembly instructions on the stack
which then gets executed. Instead the kernel will provide the relevant
code in the vDSO page and only put the pointers to the signal
information on the stack.

By dropping the need for executable stacks we avoid running into issues
with applications which want non executable stacks for security reasons.
Additionally, alternative stacks on memory areas without exec
permissions are supported too.

This code is based on an initial implementation by Randolph Chung from 2006:
https://lore.kernel.org/linux-parisc/4544A34A.6080700@tausq.org/

I did the porting and lifted the code to current code base. Dave fixed
the unwind code so that gdb and glibc are able to backtrace through the
code. An additional patch to gdb will be pushed upstream by Dave.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dave Anglin <dave.anglin@bell.net>
Cc: Randolph Chung <randolph@tausq.org>
Signed-off-by: Helge Deller <deller@gmx.de>
32 files changed:
arch/parisc/Kconfig
arch/parisc/Makefile
arch/parisc/include/asm/elf.h
arch/parisc/include/asm/mmu.h
arch/parisc/include/asm/mmu_context.h
arch/parisc/include/asm/pgtable.h
arch/parisc/include/asm/processor.h
arch/parisc/include/asm/rt_sigframe.h
arch/parisc/include/asm/tlbflush.h
arch/parisc/include/asm/unistd.h
arch/parisc/include/asm/vdso.h [new file with mode: 0644]
arch/parisc/include/uapi/asm/auxvec.h [new file with mode: 0644]
arch/parisc/kernel/Makefile
arch/parisc/kernel/asm-offsets.c
arch/parisc/kernel/cache.c
arch/parisc/kernel/signal.c
arch/parisc/kernel/signal32.h
arch/parisc/kernel/vdso.c [new file with mode: 0644]
arch/parisc/kernel/vdso32/Makefile [new file with mode: 0644]
arch/parisc/kernel/vdso32/gen_vdso_offsets.sh [new file with mode: 0755]
arch/parisc/kernel/vdso32/note.S [new file with mode: 0644]
arch/parisc/kernel/vdso32/restart_syscall.S [new file with mode: 0644]
arch/parisc/kernel/vdso32/sigtramp.S [new file with mode: 0644]
arch/parisc/kernel/vdso32/vdso32.lds.S [new file with mode: 0644]
arch/parisc/kernel/vdso32/vdso32_wrapper.S [new file with mode: 0644]
arch/parisc/kernel/vdso64/Makefile [new file with mode: 0644]
arch/parisc/kernel/vdso64/gen_vdso_offsets.sh [new file with mode: 0755]
arch/parisc/kernel/vdso64/note.S [new file with mode: 0644]
arch/parisc/kernel/vdso64/restart_syscall.S [new file with mode: 0644]
arch/parisc/kernel/vdso64/sigtramp.S [new file with mode: 0644]
arch/parisc/kernel/vdso64/vdso64.lds.S [new file with mode: 0644]
arch/parisc/kernel/vdso64/vdso64_wrapper.S [new file with mode: 0644]