From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753945AbdC1DFb (ORCPT ); Mon, 27 Mar 2017 23:05:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56951 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753849AbdC1DF3 (ORCPT ); Mon, 27 Mar 2017 23:05:29 -0400 Subject: Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin To: Kees Cook , linux-kernel@vger.kernel.org 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> Cc: Emese Revfy , Arnd Bergmann , Josh Triplett , pageexec@freemail.hu, yamada.masahiro@socionext.com, minipli@ld-linux.so, linux@armlinux.org.uk, catalin.marinas@arm.com, linux@rasmusvillemoes.dk, david.brown@linaro.org, benh@kernel.crashing.org, tglx@linutronix.de, akpm@linux-foundation.org, jlayton@poochiereds.net, sam@ravnborg.org, kernel-hardening@lists.openwall.com, linuxppc-dev , Michael Ellerman From: Andrew Donnellan Date: Tue, 28 Mar 2017 14:03:24 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: <851a0c99-db08-c3a8-f5c6-2e567971e2eb@au1.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17032803-0044-0000-0000-0000023C94FE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032803-0045-0000-0000-000006C29916 Message-Id: <1a252726-5b0f-1cd9-708e-71844df82386@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-28_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703280028 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited