linux_dsm_epyc7002/drivers/misc/lkdtm
Kevin Mitchell f2d4d5c9c6 lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ
[ Upstream commit d1f278da6b11585f05b2755adfc8851cbf14a1ec ]

When scsi_dispatch_cmd was moved to scsi_lib.c and made static, some
compilers (i.e., at least gcc 8.4.0) decided to compile this
inline. This is a problem for lkdtm.ko, which inserted a kprobe
on this function for the SCSI_DISPATCH_CMD crashpoint.

Move this crashpoint one function up the call chain to
scsi_queue_rq. Though this is also a static function, it should never be
inlined because it is assigned as a structure entry. Therefore,
kprobe_register should always be able to find it.

Fixes: 82042a2cdb ("scsi: move scsi_dispatch_cmd to scsi_lib.c")
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kevin Mitchell <kevmitch@arista.com>
Link: https://lore.kernel.org/r/20210819022940.561875-2-kevmitch@arista.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 19:12:05 +02:00
..
bugs.c lkdtm/bugs: XFAIL UNALIGNED_LOAD_STORE_WRITE 2021-07-19 09:45:00 +02:00
cfi.c lkdtm: Add Control Flow Integrity test 2019-08-12 15:28:51 -07:00
core.c lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ 2024-07-05 19:12:05 +02:00
heap.c lkdtm/heap: Avoid edge and middle of slabs 2020-06-29 18:41:39 +02:00
lkdtm.h lkdtm: remove set_fs-based tests 2020-09-08 22:21:34 -04:00
Makefile lkdtm: don't move ctors to .rodata 2021-02-17 11:02:24 +01:00
perms.c lkdtm: Avoid more compiler optimizations for bad writes 2020-06-29 18:41:39 +02:00
refcount.c lkdtm: Remove references to CONFIG_REFCOUNT_FULL 2019-11-25 09:15:46 +01:00
rodata.c lkdtm: don't move ctors to .rodata 2021-02-17 11:02:24 +01:00
stackleak.c lkdtm/stackleak: Make the test more verbose 2020-02-10 13:43:38 -08:00
usercopy.c lkdtm: remove set_fs-based tests 2020-09-08 22:21:34 -04:00