Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936030AbcJFVjl (ORCPT ); Thu, 6 Oct 2016 17:39:41 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35966 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934912AbcJFVjd (ORCPT ); Thu, 6 Oct 2016 17:39:33 -0400 MIME-Version: 1.0 In-Reply-To: <20161006051217.GA31027@dhcp-128-65.nay.redhat.com> References: <20161006051217.GA31027@dhcp-128-65.nay.redhat.com> From: Kees Cook Date: Thu, 6 Oct 2016 14:39:31 -0700 X-Google-Sender-Auth: DzkV2-j9_RteJt8xtXwS6dlImmI Message-ID: Subject: Re: [PATCH] Let CONFIG_STRICT_DEVMEM depends on CONFIG_DEVMEM To: Dave Young Cc: Andrew Morton , LKML , Ingo Molnar , Dan Williams , Paul McKenney , Josh Poimboeuf , Tejun Heo , Andrey Ryabinin , Nikolay Aleksandrov , Dmitry Vyukov 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: 886 Lines: 32 On Wed, Oct 5, 2016 at 10:12 PM, Dave Young wrote: > With CONFIG_DEVMEM not set, CONFIG_STRICT_DEVMEM will be useless > even if it is set =y, thus let's update the dependency in Kconfig. > > Signed-off-by: Dave Young Acked-by: Kees Cook > --- > lib/Kconfig.debug | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-x86.orig/lib/Kconfig.debug > +++ linux-x86/lib/Kconfig.debug > @@ -1980,7 +1980,7 @@ config ARCH_HAS_DEVMEM_IS_ALLOWED > > config STRICT_DEVMEM > bool "Filter access to /dev/mem" > - depends on MMU > + depends on MMU && DEVMEM > depends on ARCH_HAS_DEVMEM_IS_ALLOWED > default y if TILE || PPC > ---help--- While we're at it, can we make DEVKMEM default=n? The help text even suggests making it "n". -Kees -- Kees Cook Nexus Security