Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754972AbdCIRbs (ORCPT ); Thu, 9 Mar 2017 12:31:48 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:33045 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277AbdCIRbq (ORCPT ); Thu, 9 Mar 2017 12:31:46 -0500 From: Tycho Andersen To: Kees Cook , James Morris Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Tycho Andersen , "Serge E. Hallyn" Subject: [PATCH] security/Kconfig: further restrict HARDENED_USERCOPY Date: Thu, 9 Mar 2017 09:29:21 -0800 Message-Id: <1489080561-30786-1-git-send-email-tycho@docker.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 891 Lines: 28 It doesn't make sense to have HARDENED_USERCOPY when either /dev/kmem is enabled or /dev/mem can be used to read kernel memory. v2: add !MMU depend as well Signed-off-by: Tycho Andersen CC: Kees Cook CC: "Serge E. Hallyn" CC: James Morris --- security/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/security/Kconfig b/security/Kconfig index 3ff1bf9..aeabd40 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -142,6 +142,8 @@ config HARDENED_USERCOPY bool "Harden memory copies between kernel and userspace" depends on HAVE_ARCH_HARDENED_USERCOPY depends on HAVE_HARDENED_USERCOPY_ALLOCATOR + depends on !DEVKMEM + depends on !ARCH_HAS_DEVMEM_IS_ALLOWED || STRICT_DEVMEM || !MMU select BUG help This option checks for obviously wrong memory regions when -- 2.7.4