hardening: Move BUG_ON_DATA_CORRUPTION to hardening options
authorMarco Elver <elver@google.com>
Fri, 11 Aug 2023 15:18:41 +0000 (17:18 +0200)
committerKees Cook <keescook@chromium.org>
Tue, 15 Aug 2023 21:57:25 +0000 (14:57 -0700)
commitaa9f10d57056cea51d41283d3785bccbbb9f459e
tree712f14060857e79e26767cf46bd5e767592d422b
parentaebc7b0d8d91bbc69e976909963046bc48bca4fd
hardening: Move BUG_ON_DATA_CORRUPTION to hardening options

BUG_ON_DATA_CORRUPTION is turning detected corruptions of list data
structures from WARNings into BUGs. This can be useful to stop further
corruptions or even exploitation attempts.

However, the option has less to do with debugging than with hardening.
With the introduction of LIST_HARDENED, it makes more sense to move it
to the hardening options, where it selects LIST_HARDENED instead.

Without this change, combining BUG_ON_DATA_CORRUPTION with LIST_HARDENED
alone wouldn't be possible, because DEBUG_LIST would always be selected
by BUG_ON_DATA_CORRUPTION.

Signed-off-by: Marco Elver <elver@google.com>
Link: https://lore.kernel.org/r/20230811151847.1594958-4-elver@google.com
Signed-off-by: Kees Cook <keescook@chromium.org>
lib/Kconfig.debug
security/Kconfig.hardening