s390/kprobes: add sanity check
authorSven Schnelle <svens@linux.ibm.com>
Mon, 6 Sep 2021 09:25:38 +0000 (11:25 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 4 Oct 2021 07:49:36 +0000 (09:49 +0200)
commit4df898dc06da83052c73a2ce9a6a4df5640a0905
tree8bee526c6b219b1570098a105031eed3e5a99eae
parentb860b9346e2d5667fbae2cefc571bdb6ce665b53
s390/kprobes: add sanity check

Check whether the specified address points to the start of an
instruction to prevent users from setting a kprobe in the mid of
an instruction which would crash the kernel.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/kprobes.c