From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbdC0JaN (ORCPT ); Mon, 27 Mar 2017 05:30:13 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44317 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbdC0JaF (ORCPT ); Mon, 27 Mar 2017 05:30:05 -0400 From: Andrew Donnellan 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> 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 Date: Mon, 27 Mar 2017 18:38:20 +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: <1485894263-91051-2-git-send-email-keescook@chromium.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17032707-0052-0000-0000-000002284FA8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032707-0053-0000-0000-000008011A64 Message-Id: <851a0c99-db08-c3a8-f5c6-2e567971e2eb@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-27_06:,, 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-1703270069 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... > diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile > index 34a74131a12c..b98b8fdb7aaf 100644 > --- a/arch/x86/lib/Makefile > +++ b/arch/x86/lib/Makefile > @@ -29,6 +29,10 @@ lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o > obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o > > ifeq ($(CONFIG_X86_32),y) > + CFLAGS_strstr_32.o += $(INITIFY_DISABLE_VERIFIY_NOCAPTURE_FUNCTIONS) > + CFLAGS_string_32.o += $(INITIFY_DISABLE_VERIFIY_NOCAPTURE_FUNCTIONS) > + CFLAGS_memcpy_32.o += $(INITIFY_DISABLE_VERIFIY_NOCAPTURE_FUNCTIONS) s/VERIFIY/VERIFY/g here + Makefile.gcc-plugins? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited