From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pandora.armlinux.org.uk ([78.32.30.218]:52138 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750816AbcGLWJW (ORCPT ); Tue, 12 Jul 2016 18:09:22 -0400 Date: Tue, 12 Jul 2016 23:08:53 +0100 From: Russell King - ARM Linux Subject: Re: [PATCH v2 1/3] Add the initify gcc plugin Message-ID: <20160712220853.GU1041@n2100.armlinux.org.uk> References: <20160705013928.396ce4a7cbbc40e6c09efc43@gmail.com> <20160705014033.afc9a463b518e2e239c6301b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Kees Cook Cc: Emese Revfy , "kernel-hardening@lists.openwall.com" , PaX Team , Brad Spengler , Michal Marek , LKML , Masahiro Yamada , linux-kbuild , minipli@ld-linux.so, Catalin Marinas , Rasmus Villemoes , David Brown , "benh@kernel.crashing.org" , Thomas Gleixner , Andrew Morton , Jeff Layton , Arnd Bergmann , Sam Ravnborg , Karsten Keil On Tue, Jul 12, 2016 at 03:45:56PM -0400, Kees Cook wrote: > On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy wrote: > > If a function is called by __init and __exit functions as well then > > the plugin moves it to the __exit section. This causes false positive > > section mismatch errors/warnings that I don't know how to handle yet. > > Should the mismatch checker be updated to recognize this case? Without > the plugin, I assume these kinds of functions would only ever be > marked for __exit? If so, should the plugin strip the __init marking > and only add __exit? 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. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.