Date: Wed, 13 Jul 2016 23:26:14 +0200 From: Emese Revfy <re.emese@...il.com> To: Kees Cook <keescook@...omium.org> Cc: Russell King - ARM Linux <linux@...linux.org.uk>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, PaX Team <pageexec@...email.hu>, Brad Spengler <spender@...ecurity.net>, Michal Marek <mmarek@...e.com>, LKML <linux-kernel@...r.kernel.org>, Masahiro Yamada <yamada.masahiro@...ionext.com>, linux-kbuild <linux-kbuild@...r.kernel.org>, minipli@...linux.so, 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>, Arnd Bergmann <arnd@...db.de>, Sam Ravnborg <sam@...nborg.org>, Karsten Keil <isdn@...ux-pingi.de> Subject: Re: [PATCH v2 1/3] Add the initify gcc plugin On Tue, 12 Jul 2016 18:38:47 -0400 Kees Cook <keescook@...omium.org> wrote: > On Tue, Jul 12, 2016 at 6:08 PM, Russell King - ARM Linux > <linux@...linux.org.uk> wrote: > > On Tue, Jul 12, 2016 at 03:45:56PM -0400, Kees Cook wrote: > >> On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy <re.emese@...il.com> wrote: > > That sounds like a problem for architectures that still discard the > > __exit section at link time to reduce the size of the linked kernel > > image - though, obviously, if using the plugin results in a smaller > > kernel image _with_ the exit sections, then there's a net benefit > > size-wise. > > Ah right, __exit is dropped for non-modular builds. So, for "both > __init and __exit" it sounds like the behavior depends on the build: > > - if modular: remove __init marking (since we need it after init) > - if non-modular: remove __exit marking (since we'll never call exit) When gcc compiles vmlinux these functions should be in __init and when it compiles *.ko then they can be in __exit. I have no time to do this now but I added it to my todo list. The temporary fix can be that I enable this section move only on x86 (on other archs it will decrase the coverage). -- Emese
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.