Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5j+cd8iXAVko_fOFkPLD2Q=1=S0jvCYGAhKjnTunJ=86Zg@mail.gmail.com>
Date: Mon, 27 Mar 2017 09:14:36 -0700
From: Kees Cook <keescook@...omium.org>
To: Andrew Donnellan <andrew.donnellan@....ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Emese Revfy <re.emese@...il.com>, 
	Arnd Bergmann <arnd@...db.de>, Josh Triplett <josh@...htriplett.org>, PaX Team <pageexec@...email.hu>, 
	Masahiro Yamada <yamada.masahiro@...ionext.com>, minipli@...linux.so, 
	Russell King <linux@...linux.org.uk>, Catalin Marinas <catalin.marinas@....com>, 
	Rasmus Villemoes <linux@...musvillemoes.dk>, David Brown <david.brown@...aro.org>, 
	"benh@...nel.crashing.org" <benh@...nel.crashing.org>, Thomas Gleixner <tglx@...utronix.de>, 
	Andrew Morton <akpm@...ux-foundation.org>, Jeff Layton <jlayton@...chiereds.net>, 
	Sam Ravnborg <sam@...nborg.org>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>
Subject: Re: [PATCH v5 1/4] gcc-plugins: Add the initify
 gcc plugin

On Mon, Mar 27, 2017 at 12:38 AM, Andrew Donnellan
<andrew.donnellan@....ibm.com> wrote:
> On 01/02/17 07:24, Kees Cook wrote:
>>
>> From: Emese Revfy <re.emese@...il.com>
>>
>> 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...

Cool, thanks. FWIW, note that this plugin is a bit back-burnered at
the moment. I've got this in my -next tree still, but it needs some
rather large changes to how it does its annotations before Linus will
accept it.

>> 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?

Ah, thanks for catching that! I'll get that fixed.

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.