From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbdJES5a (ORCPT ); Thu, 5 Oct 2017 14:57:30 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:11571 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751525AbdJES53 (ORCPT ); Thu, 5 Oct 2017 14:57:29 -0400 Subject: Re: [PATCH] powerpc: Default to enabling STRICT_KERNEL_RWX To: Kees Cook Cc: LKML , Paul Mackerras , "linuxppc-dev@lists.ozlabs.org" References: <20171005034505.GA32157@beast> <6e6bf9ba-d66c-0bcc-358e-fed97b2ca5cd@c-s.fr> From: christophe leroy Message-ID: Date: Thu, 5 Oct 2017 20:57:24 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Antivirus: Avast (VPS 171005-4, 05/10/2017), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/10/2017 à 19:30, Kees Cook a écrit : > On Thu, Oct 5, 2017 at 12:49 AM, Christophe LEROY > wrote: >> >> >> Le 05/10/2017 à 05:45, Kees Cook a écrit : >>> >>> When available, CONFIG_KERNEL_RWX should be default-enabled. >> >> >> On PPC32, this option implies deactivating BATs and/or LTLB mapping of the >> linear kernel address space, hence a significant performance degradation. >> >> So at least on PPC32, it should remain unselected by default. > > Alright, sounds fine to me. Would this be okay? > > + select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if !PPC64 You mean select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if PPC64 Don't you ? Christophe > > -Kees > >> >> Christophe >> >> >>> >>> Cc: Benjamin Herrenschmidt >>> Cc: Paul Mackerras >>> Cc: Michael Ellerman >>> Cc: linuxppc-dev@lists.ozlabs.org >>> Signed-off-by: Kees Cook >>> --- >>> arch/powerpc/Kconfig | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >>> index 809c468edab1..9a549bbfc278 100644 >>> --- a/arch/powerpc/Kconfig >>> +++ b/arch/powerpc/Kconfig >>> @@ -178,6 +178,7 @@ config PPC >>> select HAVE_ARCH_TRACEHOOK >>> select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || >>> PPC32) && !RELOCATABLE && !HIBERNATION) >>> select ARCH_OPTIONAL_KERNEL_RWX if >>> ARCH_HAS_STRICT_KERNEL_RWX >>> + select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT >>> select HAVE_CBPF_JIT if !PPC64 >>> select HAVE_CONTEXT_TRACKING if PPC64 >>> select HAVE_DEBUG_KMEMLEAK >>> >> > > > --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus