Skip to contentSkip to conversation

arm64: compat: Split the sigreturn trampolines and kuser helpers (assembler sources)

PATCH In review Mark Salyzyn 1 participant 1 message Sep 11, 2017 arm64

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/3 arm64: compat: Split the sigreturn trampolines and kuser helpers (assembler sources)

From: Kevin Brodsky <[email protected]>

AArch32 processes are currently installed a special [vectors] page that contains the sigreturn trampolines and the kuser helpers, at the fixed address mandated by the kuser helpers ABI.

Having both functionalities in the same page has become problematic, because:

* It makes it impossible to disable the kuser helpers (the sigreturn trampolines cannot be removed), which is possible on arm.

* A future 32-bit vDSO would provide the sigreturn trampolines itself, making those in [vectors] redundant.

This patch addresses the problem by moving the sigreturn trampolines sources to its own file. Wrapped the comments to reduce the wrath of checkpatch.pl.

v2:
- split off from previous v1 'arm64: compat: Add CONFIG_KUSER_HELPERS'
- adjust makefile so one line for each of the assembler source modules

v3:
- rebase

---
 arch/arm64/kernel/Makefile      |  4 ++-
 arch/arm64/kernel/kuser32.S     | 48 ++---------------------------
 arch/arm64/kernel/sigreturn32.S | 67 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 46 deletions(-)
 create mode 100644 arch/arm64/kernel/sigreturn32.S
arch/arm64/kernel/Makefile +3 -1
index f2b4e816b6de..59e1b2b002e5 100644
@@ -27,8 +27,10 @@ OBJCOPYFLAGS := --prefix-symbols=__efistub_
 $(obj)/%.stub.o: $(obj)/%.o FORCE
 	$(call if_changed,objcopy)
 
-arm64-obj-$(CONFIG_COMPAT)		+= sys32.o kuser32.o signal32.o 	\
+arm64-obj-$(CONFIG_COMPAT)		+= sys32.o signal32.o	\
 					   sys_compat.o entry32.o
+arm64-obj-$(CONFIG_COMPAT)		+= sigreturn32.o
+arm64-obj-$(CONFIG_COMPAT)		+= kuser32.o
 arm64-obj-$(CONFIG_FUNCTION_TRACER)	+= ftrace.o entry-ftrace.o
 arm64-obj-$(CONFIG_MODULES)		+= arm64ksyms.o module.o
 arm64-obj-$(CONFIG_ARM64_MODULE_PLTS)	+= module-plts.o
arch/arm64/kernel/kuser32.S +3 -45

61 lines not on this page · raw message

arch/arm64/kernel/sigreturn32.S new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.14.1.581.gf28d330327-goog