* [PATCH] lkdtm: replace ll_rw_block with submit_bh
@ 2023-05-03 16:29 Yue Zhao
2023-05-04 1:14 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Yue Zhao @ 2023-05-03 16:29 UTC (permalink / raw)
To: keescook; +Cc: arnd, gregkh, linux-kernel, Yue Zhao
Function ll_rw_block was removed in commit 79f597842069 ("fs/buffer:
remove ll_rw_block() helper"). There is no unified function to sumbit
read or write buffer in block layer for now. Consider similar sematics,
we can choose submit_bh() to replace ll_rw_block() as predefined crash
point. In submit_bh(), it also takes read or write flag as the first
argument and invoke submit_bio() to submit I/O request to block layer.
Fixes: 79f597842069 ("fs/buffer: remove ll_rw_block() helper")
Signed-off-by: Yue Zhao <findns94@gmail.com>
---
Documentation/fault-injection/provoke-crashes.rst | 2 +-
drivers/misc/lkdtm/core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/fault-injection/provoke-crashes.rst b/Documentation/fault-injection/provoke-crashes.rst
index 3abe84225613..1f087e502ca6 100644
--- a/Documentation/fault-injection/provoke-crashes.rst
+++ b/Documentation/fault-injection/provoke-crashes.rst
@@ -29,7 +29,7 @@ recur_count
cpoint_name
Where in the kernel to trigger the action. It can be
one of INT_HARDWARE_ENTRY, INT_HW_IRQ_EN, INT_TASKLET_ENTRY,
- FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ, or DIRECT.
+ FS_SUBMIT_BH, MEM_SWAPOUT, TIMERADD, SCSI_QUEUE_RQ, or DIRECT.
cpoint_type
Indicates the action to be taken on hitting the crash point.
diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
index b4712ff196b4..0772e4a4757e 100644
--- a/drivers/misc/lkdtm/core.c
+++ b/drivers/misc/lkdtm/core.c
@@ -79,7 +79,7 @@ static struct crashpoint crashpoints[] = {
CRASHPOINT("INT_HARDWARE_ENTRY", "do_IRQ"),
CRASHPOINT("INT_HW_IRQ_EN", "handle_irq_event"),
CRASHPOINT("INT_TASKLET_ENTRY", "tasklet_action"),
- CRASHPOINT("FS_DEVRW", "ll_rw_block"),
+ CRASHPOINT("FS_SUBMIT_BH", "submit_bh"),
CRASHPOINT("MEM_SWAPOUT", "shrink_inactive_list"),
CRASHPOINT("TIMERADD", "hrtimer_start"),
CRASHPOINT("SCSI_QUEUE_RQ", "scsi_queue_rq"),
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lkdtm: replace ll_rw_block with submit_bh
2023-05-03 16:29 [PATCH] lkdtm: replace ll_rw_block with submit_bh Yue Zhao
@ 2023-05-04 1:14 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2023-05-04 1:14 UTC (permalink / raw)
To: Yue Zhao; +Cc: arnd, gregkh, linux-kernel
On Thu, May 04, 2023 at 12:29:44AM +0800, Yue Zhao wrote:
> Function ll_rw_block was removed in commit 79f597842069 ("fs/buffer:
> remove ll_rw_block() helper"). There is no unified function to sumbit
> read or write buffer in block layer for now. Consider similar sematics,
> we can choose submit_bh() to replace ll_rw_block() as predefined crash
> point. In submit_bh(), it also takes read or write flag as the first
> argument and invoke submit_bio() to submit I/O request to block layer.
>
> Fixes: 79f597842069 ("fs/buffer: remove ll_rw_block() helper")
>
> Signed-off-by: Yue Zhao <findns94@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-04 1:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 16:29 [PATCH] lkdtm: replace ll_rw_block with submit_bh Yue Zhao
2023-05-04 1:14 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox