linux/arch/s390/kernel
Tobias Huschle 63bf38ff5b s390/kprobes: Avoid additional kprobe in kretprobe handling
So far, s390 registered a krobe on __kretprobe_trampoline which is
called everytime a kretprobe fires. This kprobe would then determine
the correct return address and adjust the psw accordingly, such that
the kretprobe would branch to the appropriate address after completion.

Some other archs handle kretprobes without such an additional kprobe.
This approach is adopted to s390 with this patch.
Furthermore, the __kretprobe_trampoline now uses an assembler function
to correctly gather the register and psw content to be passed to the
registered kretprobe handler as struct pt_regs. After completion, the
register content and the psw are set based on the contents of said
pt_regs struct.
Note that a change to the psw address in struct pt_regs will not have
an impact, as the probe will still return to the original return
address of the probed function.
The return address is now recovered by using the appropriate function
arch_kretprobe_fixup_return.

The no longer needed kprobe is removed.

Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Tobias Huschle <huschle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2022-03-10 15:58:17 +01:00
..
syscalls mm/mempolicy: wire up syscall set_mempolicy_home_node 2022-01-15 16:30:30 +02:00
vdso32 s390/vdso: remove -nostdlib compiler flag 2021-11-16 12:29:19 +01:00
vdso64 s390/vdso: filter out -mstack-guard and -mstack-size 2021-11-16 12:29:19 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
alternative.c s390: introduce text_poke_sync() 2021-10-11 20:55:58 +02:00
asm-offsets.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
audit.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
base.S s390/base: pass pt_regs to early program check handler 2022-03-08 00:33:00 +01:00
cache.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
compat_audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
compat_linux.c s390: use generic UID16 implementation 2019-01-18 09:33:18 +01:00
compat_linux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_ptrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_signal.c s390/signal: fix typo in comments 2022-03-08 00:33:01 +01:00
cpcmd.c s390/cpcmd: use physical address for command and response 2021-10-26 15:21:28 +02:00
crash_dump.c s390/maccess: fix semantics of memcpy_real() and its callers 2022-02-09 22:56:04 +01:00
debug.c s390/sclp: add tracing of SCLP interactions 2021-08-25 11:03:35 +02:00
diag.c s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
dis.c s390/disassembler: update opcode table 2021-12-16 19:58:07 +01:00
dumpstack.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
early_printk.c s390/sclp: remove unused sclp_early_printk_forced 2020-09-21 08:08:44 +02:00
early.c s390/extable: add and use fixup_exception helper function 2022-03-08 00:33:00 +01:00
ebcdic.c s390: ebcdic: convert comments to UTF-8 2018-08-23 18:48:43 -07:00
entry.h s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
entry.S s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
fpu.c s390: convert to generic entry 2021-01-19 12:29:26 +01:00
ftrace.c s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
ftrace.h s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
guarded_storage.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
head64.S s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
idle.c s390/time,idle: get rid of unsigned long long 2021-03-08 10:46:27 +01:00
ima_arch.c s390/kexec_file: Disable kexec_load when IPLed secure 2019-04-29 10:44:03 +02:00
ipl_vmparm.c s390/cio: remove unused include linux/spinlock.h from cio.h 2021-07-27 09:39:13 +02:00
ipl.c s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
irq.c s390/irq: use assignment instead of cast 2022-03-08 00:33:01 +01:00
jump_label.c s390/jump_label: add __init_or_module annotation 2021-10-11 20:55:58 +02:00
kdebugfs.c s390: no need to check return value of debugfs_create functions 2019-01-28 15:58:55 +01:00
kexec_elf.c kexec: Fix file verification on S390 2019-09-10 13:27:51 +01:00
kexec_image.c kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE 2019-08-19 21:54:15 -07:00
kprobes_insn_page.S s390/kprobes: move insn_page to text segment 2020-10-09 23:45:30 +02:00
kprobes.c s390/kprobes: Avoid additional kprobe in kretprobe handling 2022-03-10 15:58:17 +01:00
lgr.c s390/lgr: use simple assignment instead of memcpy 2022-02-06 23:31:29 +01:00
machine_kexec_file.c s390/kexec: handle R_390_PLT32DBL rela in arch_kexec_apply_relocations_add() 2021-12-10 16:12:34 +01:00
machine_kexec_reloc.c s390/kaslr: add support for R_390_JMP_SLOT relocation type 2020-05-20 10:13:27 +02:00
machine_kexec.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
Makefile s390/kprobes: Avoid additional kprobe in kretprobe handling 2022-03-10 15:58:17 +01:00
mcount.S s390/kprobes: Avoid additional kprobe in kretprobe handling 2022-03-10 15:58:17 +01:00
module.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
nmi.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
nospec-branch.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
nospec-sysfs.c s390: introduce nospec_uses_trampoline() 2021-10-26 15:21:29 +02:00
numa.c s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
os_info.c s390/maccess: fix semantics of memcpy_real() and its callers 2022-02-09 22:56:04 +01:00
perf_cpum_cf_common.c s390/cpumf: Support for CPU Measurement Facility CSVN 7 2022-01-17 14:13:08 +01:00
perf_cpum_cf_events.c s390/cpumf: Support for CPU Measurement Facility CSVN 7 2022-01-17 14:13:08 +01:00
perf_cpum_cf.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
perf_cpum_sf.c s390/cpumf: Support for CPU Measurement Sampling Facility LS bit 2022-01-17 14:13:08 +01:00
perf_event.c s390: Get rid of oprofile leftovers 2021-04-22 13:32:39 +01:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
process.c s390/exit: remove dead reference to do_exit from copy_thread 2021-12-16 19:58:06 +01:00
processor.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
ptrace.c s390/ptrace: remove opencoded offsetof 2022-03-01 21:05:10 +01:00
reipl.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
relocate_kernel.S s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
runtime_instr.c s390/runtime_instrumentation: fix storage key handling 2020-08-17 13:17:10 +02:00
setup.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
signal.c s390/signal: fix typo in comments 2022-03-08 00:33:01 +01:00
smp.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
stacktrace.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
sthyi.c s390/sthyi: use register pair instead of register asm 2021-06-18 16:41:22 +02:00
syscall.c s390: add support for BEAR enhancement facility 2021-10-26 15:21:29 +02:00
sysinfo.c s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
text_amode31.S s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
time.c s390/vdso: fix initializing and updating of vdso_data 2021-03-25 21:57:26 +01:00
topology.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
trace.c s390/ftrace: fix potential crashes when switching tracers 2020-04-22 16:20:55 +02:00
traps.c s390/traps: get rid of magic cast for per code 2022-03-08 00:33:01 +01:00
unwind_bc.c s390/unwind: stop gracefully at user mode pt_regs in irq stack 2019-12-18 23:29:26 +01:00
uprobes.c s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
uv.c s390/uv: fix memblock virtual vs physical address confusion 2021-12-16 19:58:07 +01:00
vdso.c s390/vdso: add minimal compat vdso 2021-07-08 15:37:28 +02:00
vmlinux.lds.S s390: remove .fixup section 2022-03-08 00:33:01 +01:00
vtime.c s390: assume stckf is always present 2022-03-10 15:58:17 +01:00