From: Kees Cook <keescook@chromium.org>
To: kernel-hardening@lists.openwall.com
Cc: Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Dmitry Vyukov <dvyukov@google.com>,
Olof Johansson <olof@lixom.net>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/6] bug: Enable DEBUG_SG under BUG_ON_DATA_CORRUPTION
Date: Mon, 6 Mar 2017 11:09:44 -0800 [thread overview]
Message-ID: <1488827386-87193-5-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1488827386-87193-1-git-send-email-keescook@chromium.org>
Similar to CONFIG_DEBUG_CREDENTIALS, CONFIG_DEBUG_SG already handles
calling BUG, and performs inexpensive checks. This enables it under
CONFIG_BUG_ON_DATA_CORRUPTION.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
lib/Kconfig.debug | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 009d6f8c7e5a..42c61cfe7d19 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1267,7 +1267,7 @@ config DEBUG_PI_LIST
config DEBUG_SG
bool "Debug SG table operations"
- depends on DEBUG_KERNEL
+ depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION
help
Enable this to turn on checks on scatter-gather tables. This can
help find problems with drivers that do not properly initialize
@@ -1995,6 +1995,7 @@ config BUG_ON_DATA_CORRUPTION
bool "Trigger a BUG when data corruption is detected"
select DEBUG_CREDENTIALS
select DEBUG_LIST
+ select DEBUG_SG
help
This option enables several inexpensive data corruption checks.
Most of these checks normally just WARN and try to further avoid
--
2.7.4
next prev parent reply other threads:[~2017-03-06 19:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 19:09 [PATCH 0/6] bug: further enhance use of BUG_ON_DATA_CORRUPTION Kees Cook
2017-03-06 19:09 ` [PATCH 1/6] bug: Clarify help text for BUG_ON_DATA_CORRUPTION Kees Cook
2017-03-06 19:09 ` [PATCH 2/6] bug: Improve unlikely() in data corruption check Kees Cook
2017-03-06 19:09 ` [PATCH 3/6] bug: Enable DEBUG_CREDENTIALS under BUG_ON_DATA_CORRUPTION Kees Cook
2017-03-06 19:09 ` Kees Cook [this message]
2017-03-06 19:09 ` [PATCH 5/6] notifiers: Use CHECK_DATA_CORRUPTION() on checks Kees Cook
2017-03-22 19:29 ` Kees Cook
2017-03-22 19:32 ` Arjan van de Ven
2017-03-22 19:55 ` Kees Cook
2017-03-06 19:09 ` [PATCH 6/6] refcount: Check bad states with CHECK_DATA_CORRUPTION Kees Cook
2017-03-22 19:30 ` 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=1488827386-87193-5-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=jakub.kicinski@netronome.com \
--cc=jpoimboe@redhat.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=olof@lixom.net \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.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
all inboxes | Powered by JetHome®