Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752600AbdLDSTc (ORCPT ); Mon, 4 Dec 2017 13:19:32 -0500 Received: from mail-vk0-f65.google.com ([209.85.213.65]:37136 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbdLDST2 (ORCPT ); Mon, 4 Dec 2017 13:19:28 -0500 X-Google-Smtp-Source: AGs4zMZyvlrjOh/eyfX94XMwZqOej7Su3QbiyZyusWQR41orVpcDmQeoE87z8l/bby5afdBa8BVToUjbcL5PMfhzh78= MIME-Version: 1.0 In-Reply-To: <20171204155610.GH29619@arm.com> References: <20171201201000.GA44539@beast> <20171204155610.GH29619@arm.com> From: Kees Cook Date: Mon, 4 Dec 2017 10:19:26 -0800 X-Google-Sender-Auth: Br_OiWM9e4qMxYeRziYbMuMyRnI Message-ID: Subject: Re: [PATCH] Kconfig: Make STRICT_DEVMEM default-y on x86 and arm64 To: Will Deacon Cc: Andrew Morton , LKML , kernel-hardening@lists.openwall.com, Mark Rutland , Laura Abbott , X86 ML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1375 Lines: 48 On Mon, Dec 4, 2017 at 7:56 AM, Will Deacon wrote: > On Fri, Dec 01, 2017 at 12:10:00PM -0800, Kees Cook wrote: >> Distros have been shipping with CONFIG_STRICT_DEVMEM=y for years now. It >> is probably time to flip this default for x86 and arm64. > > Should we be defaulting IO_STRICT_DEVMEM on as well? I'd love to see that, but I haven't seen a long history on this setting yet. It may be that arm64 can do it, since it doesn't have the x86 hardware legacy stuff ... If you're willing to give it a shot, I'm all for it. :) -Kees > > Will > >> Signed-off-by: Kees Cook >> --- >> lib/Kconfig.debug | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug >> index 947d3e2ed5c2..39b123d04a36 100644 >> --- a/lib/Kconfig.debug >> +++ b/lib/Kconfig.debug >> @@ -1985,7 +1985,7 @@ config STRICT_DEVMEM >> bool "Filter access to /dev/mem" >> depends on MMU && DEVMEM >> depends on ARCH_HAS_DEVMEM_IS_ALLOWED >> - default y if TILE || PPC >> + default y if TILE || PPC || X86 || ARM64 >> ---help--- >> If this option is disabled, you allow userspace (root) access to all >> of memory, including kernel and userspace memory. Accidental >> -- >> 2.7.4 >> >> >> -- >> Kees Cook >> Pixel Security -- Kees Cook Pixel Security