[linux-kvm-bionic,1/2] usercopy: Do not select BUG with HARDENED_USERCOPY

Message ID 1530891502-14019-2-git-send-email-kamal@canonical.com
State New
Headers show
Series
  • Enable CONFIG_HARDENED_USERCOPY
Related show

Commit Message

Kamal Mostafa July 6, 2018, 3:38 p.m.
BugLink: https://bugs.launchpad.net/bugs/1766777

There is no need to "select BUG" when CONFIG_HARDENED_USERCOPY is enabled.
The kernel thread will always die, regardless of the CONFIG_BUG.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
[kees: tweak commit log]
Signed-off-by: Kees Cook <keescook@chromium.org>

(cherry picked from commit 6aa56f44253a6dd802e45d8ab1b48847feaf063a linux-next)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 security/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Patch

diff --git a/security/Kconfig b/security/Kconfig
index 16803be..8320651 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -195,7 +195,6 @@  config HAVE_HARDENED_USERCOPY_ALLOCATOR
 config HARDENED_USERCOPY
 	bool "Harden memory copies between kernel and userspace"
 	depends on HAVE_HARDENED_USERCOPY_ALLOCATOR
-	select BUG
 	imply STRICT_DEVMEM
 	help
 	  This option checks for obviously wrong memory regions when