Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1616418
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 5/7] bug: Enable DEBUG_SG under BUG_ON_DATA_CORRUPTION |
| Date | 2017-04-05 00:20 +0200 |
| Message-ID | <tsEXU-2s7-25@gated-at.bofh.it> (permalink) |
| References | <tsEXT-2s7-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 9a1b6b56cef4..45bfc0be38fc 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1268,7 +1268,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 @@ -1998,6 +1998,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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] bug: further enhance use of CHECK_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-04-05 00:20 +0200 [PATCH v2 5/7] bug: Enable DEBUG_SG under BUG_ON_DATA_CORRUPTION Kees Cook <keescook@chromium.org> - 2017-04-05 00:20 +0200 [PATCH v2 3/7] bug: Use WARN_ONCE() for CHECK_DATA_CORRUPTION() Kees Cook <keescook@chromium.org> - 2017-04-05 00:20 +0200 [PATCH v2 2/7] bug: Improve unlikely() in data corruption check Kees Cook <keescook@chromium.org> - 2017-04-05 00:20 +0200
csiph-web