diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2020-09-18 10:26:19 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-10-09 23:45:30 +0200 |
commit | b61e1f3281c5a53f24f47849873463514f58c1b8 (patch) | |
tree | 73623ca152797153f08cddc9bca78cb8f619869f /arch/s390/kernel/entry.h | |
parent | s390/sie: fix typo in SIGP code description (diff) | |
download | linux-b61e1f3281c5a53f24f47849873463514f58c1b8.tar.xz linux-b61e1f3281c5a53f24f47849873463514f58c1b8.zip |
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/entry.h')
-rw-r--r-- | arch/s390/kernel/entry.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index 6475a885cd60..0f7e4e9176e0 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h @@ -87,4 +87,6 @@ void set_fs_fixup(void); unsigned long stack_alloc(void); void stack_free(unsigned long stack); +extern char kprobes_insn_page[]; + #endif /* _ENTRY_H */ |