Thread (92 messages) 92 messages, 7 authors, 2021-11-03

Re: [PATCH v8 05/12] test_sysfs: add support to use kernfs failure injection

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-10-11 20:56:33
Also in: linux-doc, linux-fsdevel, linux-kselftest, lkml

On Tue, Oct 05, 2021 at 12:51:33PM -0700, Kees Cook wrote:
On Mon, Sep 27, 2021 at 09:37:58AM -0700, Luis Chamberlain wrote:
quoted
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index a29b7d398c4e..176b822654e5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2358,6 +2358,9 @@ config TEST_SYSFS
 	depends on SYSFS
 	depends on NET
 	depends on BLOCK
+	select FAULT_INJECTION
+	select FAULT_INJECTION_DEBUG_FS
+	select FAIL_KERNFS_KNOBS
I don't like seeing "select" for user-configurable CONFIGs -- things
tend to end up weird. This should simply be:

	depends on FAIL_KERNFS_KNOBS
Sure.
quoted
diff --git a/lib/test_sysfs.c b/lib/test_sysfs.c
index 2043ca494af8..c6e62de61403 100644
--- a/lib/test_sysfs.c
+++ b/lib/test_sysfs.c
@@ -38,6 +38,11 @@
 #include <linux/rtnetlink.h>
 #include <linux/genhd.h>
 #include <linux/blkdev.h>
+#include <linux/kernfs.h>
+
+#ifdef CONFIG_FAIL_KERNFS_KNOBS
This isn't an optional config here (and following)?
Sure with the above change this is no longer needed. Removed all that
ifdef'ery.

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help