summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/Makefile
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2020-09-18 10:26:19 +0200
committerVasily Gorbik <gor@linux.ibm.com>2020-10-09 23:45:30 +0200
commitb61e1f3281c5a53f24f47849873463514f58c1b8 (patch)
tree73623ca152797153f08cddc9bca78cb8f619869f /arch/s390/kernel/Makefile
parenteefc69a09ca5b441ee136f9fb68ab5970cfc2d51 (diff)
s390/kprobes: move insn_page to text segment
Move the in-kernel kprobes insn page to text segment. Rationale: having that page in rw data segment is suboptimal, since as soon as a kprobe is set, this will split the 1:1 kernel mapping for a single page which get new permissions. Note: there is always at least one kprobe present for the kretprobe trampoline; so the mapping will always be split into smaller 4k mappings because of this. Moving the kprobes insn page into text segment makes sure that the page is mapped RO/X in any case, and avoids that the 1:1 mapping is split. The kprobe insn_page is defined as a dummy function which is filled with "br %r14" instructions. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/Makefile')
-rw-r--r--arch/s390/kernel/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index efca70970761..dd73b7f07423 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_COMPAT) += $(compat-obj-y)
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_KPROBES) += kprobes.o
+obj-$(CONFIG_KPROBES) += kprobes_insn_page.o
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_UPROBES) += uprobes.o