Re: [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-30 Thread Arnd Bergmann
On Wed, Mar 29, 2017 at 10:56 AM, Arnd Bergmann wrote: > And here is a workaround that I applied locally to avoid the ICE, but > I wouldn't want to have this upstream. > > commit 8712fd8979a5730318a84922fbcb8791ea5af40e > Author: Arnd Bergmann > Date: Wed Mar 29 10:53:48 2017 +0200 > > work

Re: [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-29 Thread Arnd Bergmann
And here is a workaround that I applied locally to avoid the ICE, but I wouldn't want to have this upstream. commit 8712fd8979a5730318a84922fbcb8791ea5af40e Author: Arnd Bergmann Date: Wed Mar 29 10:53:48 2017 +0200 work around initify ICE arch/arm/mach-mv78xx0/common.i: In function '

Re: [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-29 Thread Arnd Bergmann
Here is a reduced test case for one assertion failure I get with the initify plugin: 8< typedef unsigned int u32; __attribute__ ((format(printf, 1, 2))) __attribute__ ((__cold__)) int printk(const char *fmt, ...); void mv78xx0_pcie_id(u32 * dev, u32 * rev); static char * __attribute

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-28 Thread Arnd Bergmann
On Tue, Mar 28, 2017 at 9:03 PM, Kees Cook wrote: > On Tue, Mar 28, 2017 at 12:49 AM, Arnd Bergmann wrote: >> On Mon, Mar 27, 2017 at 6:14 PM, Kees Cook wrote: >>> On Mon, Mar 27, 2017 at 12:38 AM, Andrew Donnellan >>> wrote: On 01/02/17 07:24, Kees Cook wrote: > > From: Emese Revf

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-28 Thread Kees Cook
On Tue, Mar 28, 2017 at 12:49 AM, Arnd Bergmann wrote: > On Mon, Mar 27, 2017 at 6:14 PM, Kees Cook wrote: >> On Mon, Mar 27, 2017 at 12:38 AM, Andrew Donnellan >> wrote: >>> On 01/02/17 07:24, Kees Cook wrote: From: Emese Revfy The kernel already has a mechanism to free up

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-28 Thread Kees Cook
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 initia

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-28 Thread Arnd Bergmann
On Mon, Mar 27, 2017 at 6:14 PM, Kees Cook wrote: > On Mon, Mar 27, 2017 at 12:38 AM, 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 modul

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-27 Thread Andrew Donnellan
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 tha

Re: [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-27 Thread Rasmus Villemoes
On Mon, Mar 27 2017, Kees Cook wrote: > On Mon, Mar 27, 2017 at 12:38 AM, 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 initializ

Re: [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-27 Thread Kees Cook
On Mon, Mar 27, 2017 at 12:31 PM, Rasmus Villemoes wrote: > On Mon, Mar 27 2017, Kees Cook wrote: > >> On Mon, Mar 27, 2017 at 12:38 AM, 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 an

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-27 Thread Kees Cook
On Mon, Mar 27, 2017 at 12:38 AM, 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

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-27 Thread Andrew Donnellan
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. Curre

[PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-01-31 Thread Kees Cook
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. The plugin runs in two passes. The first one