From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vt0Zl3vr8zDqY4 for ; Wed, 29 Mar 2017 06:00:15 +1100 (AEDT) Received: by mail-it0-x22a.google.com with SMTP id y18so31403817itc.1 for ; Tue, 28 Mar 2017 12:00:15 -0700 (PDT) MIME-Version: 1.0 Sender: keescook@google.com In-Reply-To: <1a252726-5b0f-1cd9-708e-71844df82386@au1.ibm.com> References: <1485894263-91051-1-git-send-email-keescook@chromium.org> <1485894263-91051-2-git-send-email-keescook@chromium.org> <851a0c99-db08-c3a8-f5c6-2e567971e2eb@au1.ibm.com> <1a252726-5b0f-1cd9-708e-71844df82386@au1.ibm.com> From: Kees Cook Date: Tue, 28 Mar 2017 12:00:12 -0700 Message-ID: Subject: Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin To: Andrew Donnellan Cc: LKML , Emese Revfy , Arnd Bergmann , Josh Triplett , PaX Team , Masahiro Yamada , minipli@ld-linux.so, Russell King , Catalin Marinas , Rasmus Villemoes , David Brown , "benh@kernel.crashing.org" , Thomas Gleixner , Andrew Morton , Jeff Layton , Sam Ravnborg , "kernel-hardening@lists.openwall.com" , linuxppc-dev , Michael Ellerman Content-Type: text/plain; charset=UTF-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Mar 27, 2017 at 8:03 PM, Andrew Donnellan wrote: > On 27/03/17 18:38, Andrew Donnellan wrote: >> >> On 01/02/17 07:24, Kees Cook wrote: >>> >>> From: Emese Revfy >>> >>> The kernel already has a mechanism to free up code and data memory that >>> is only used during kernel or module initialization. This plugin will >>> teach the compiler to find more such code and data that can be freed >>> after initialization. >> >> >> Currently checking whether we can wire this up for powerpc without too >> many problems... > > > Added "select HAVE_GCC_PLUGIN_INITIFY_INIT_EXIT if GCC_PLUGINS" to > arch/powerpc/Kconfig and have successfully compiled and booted a modular and > non-modular powernv_defconfig, it looks like we handle the .exit sections > correctly. > > Could this be folded in for further testing when you get around to v6, Kees? Awesome, thanks for testing! I'll get it queued for a v6... -Kees -- Kees Cook Pixel Security