From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: linuxppc-dev@lists.ozlabs.org, Kees Cook <keescook@chromium.org>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lkdtm: do not depend on CONFIG_BLOCK
Date: Tue, 27 Nov 2018 08:43:16 +0100 [thread overview]
Message-ID: <20181127074316.GC13965@kroah.com> (raw)
In-Reply-To: <ca27a073c872e243be1d17a89afb4b4aeb9a298b.1541714054.git.christophe.leroy@c-s.fr>
On Fri, Nov 09, 2018 at 07:05:51AM +0000, Christophe Leroy wrote:
> Most parts of lkdtm don't require CONFIG_BLOCK.
>
> This patch limits dependency to CONFIG_BLOCK in order to give embedded
> platforms which don't select CONFIG_BLOCK the opportunity to use LKDTM.
>
> Fixes: fddd9cf82c9f ("make LKDTM depend on BLOCK")
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> drivers/misc/lkdtm/core.c | 7 ++++++-
> lib/Kconfig.debug | 1 -
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/lkdtm/core.c b/drivers/misc/lkdtm/core.c
> index 2837dc77478e..bc76756b7eda 100644
> --- a/drivers/misc/lkdtm/core.c
> +++ b/drivers/misc/lkdtm/core.c
> @@ -40,9 +40,12 @@
> #include <linux/interrupt.h>
> #include <linux/hrtimer.h>
> #include <linux/slab.h>
> -#include <scsi/scsi_cmnd.h>
> #include <linux/debugfs.h>
>
> +#ifdef CONFIG_BLOCK
> +#include <scsi/scsi_cmnd.h>
> +#endif
Why would this config option be needed to be checked just to be able to
include a .h file?
And shouldn't you be depending on SCSI instead?
> +
> #ifdef CONFIG_IDE
> #include <linux/ide.h>
> #endif
> @@ -101,7 +104,9 @@ static struct crashpoint crashpoints[] = {
> CRASHPOINT("FS_DEVRW", "ll_rw_block"),
> CRASHPOINT("MEM_SWAPOUT", "shrink_inactive_list"),
> CRASHPOINT("TIMERADD", "hrtimer_start"),
> +# ifdef CONFIG_BLOCK
> CRASHPOINT("SCSI_DISPATCH_CMD", "scsi_dispatch_cmd"),
> +# endif
Again, scsi?
thanks,
greg k-h
next prev parent reply other threads:[~2018-11-27 7:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 7:05 [PATCH] lkdtm: do not depend on CONFIG_BLOCK Christophe Leroy
2018-11-27 7:43 ` Greg Kroah-Hartman [this message]
2018-11-27 15:59 ` Christophe Leroy
2018-11-27 17:03 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181127074316.GC13965@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=christophe.leroy@c-s.fr \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).