public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Emese Revfy <re.emese@gmail.com>
To: kernel-hardening@lists.openwall.com
Cc: pageexec@freemail.hu, spender@grsecurity.net, mmarek@suse.com,
	keescook@chromium.org, linux-kernel@vger.kernel.org,
	yamada.masahiro@socionext.com, linux-kbuild@vger.kernel.org,
	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, arnd@arndb.de
Subject: Re: [PATCH v1 0/2] Introduce the initify gcc plugin
Date: Tue, 28 Jun 2016 13:42:37 +0200	[thread overview]
Message-ID: <20160628134237.910997b2430dfdf4c55b05ee@gmail.com> (raw)
In-Reply-To: <20160628133407.10c2ea1ecd194e8085e84c5a@gmail.com>

On Tue, 28 Jun 2016 13:34:07 +0200
Emese Revfy <re.emese@gmail.com> wrote:

>  * automatically discover init/exit functions and apply the __init or
>    __exit attributes on them

Hi,

I have a question about this. If a function is called by __init and __exit functions as well then
I move it to the __exit section. I think this is correct because such a function is available to
both __init and __exit functions as well at runtime.
However this generates a section mismatch (from scripts/mod/modpost.c) e.g.,

   WARNING: vmlinux.o(.init.text+0x196849): Section mismatch in reference from the function sctp_init() to the function .exit.text:sctp_v4_del_protocol()
   The function __init sctp_init() references
   a function __exit sctp_v4_del_protocol().
   This is often seen when error handling in the init function
   uses functionality in the exit path.
   The fix is often to remove the __exit annotation of
   sctp_v4_del_protocol() so it may be used outside an exit section.

This check was introduced by this commit (588ccd732ba2d):
kbuild: add verbose option to Section mismatch reporting in modpost

If this move doesn't cause a problem then I would like to keep it because there are a lot of functions that can become __exit and I would like to remove this warning.

Thanks
-- 
Emese

  parent reply	other threads:[~2016-06-28 11:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 11:34 [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy
2016-06-28 11:35 ` [PATCH v1 1/2] Add " Emese Revfy
2016-06-28 21:05   ` Rasmus Villemoes
2016-06-29 14:50     ` Kees Cook
2016-06-29 19:03     ` Emese Revfy
2016-06-28 11:36 ` [PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy
2016-06-28 16:43   ` Joe Perches
2016-06-28 20:40     ` Emese Revfy
2016-06-28 21:00       ` Joe Perches
2016-06-29 18:42         ` Emese Revfy
2016-06-30  0:12           ` Joe Perches
2016-07-01 14:03             ` Emese Revfy
2016-06-28 20:50   ` Rasmus Villemoes
2016-06-28 21:38     ` PaX Team
2016-06-28 22:41       ` Rasmus Villemoes
2016-06-29 18:39     ` Emese Revfy
2016-06-28 11:42 ` Emese Revfy [this message]
2016-06-28 12:57 ` [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Mark Rutland
2016-06-28 16:14   ` Emese Revfy
2016-06-28 20:46     ` Kees Cook
2016-06-29  8:21       ` Mark Rutland
2016-06-29 17:52         ` Mark Rutland
2016-06-29 18:28           ` Emese Revfy
2016-06-28 16:35 ` Joe Perches
2016-06-28 18:48   ` Joe Perches
2016-06-28 19:02     ` Rasmus Villemoes
2016-06-28 20:29       ` Emese Revfy
2016-06-28 17:00 ` Mathias Krause
2016-06-28 20:29   ` Emese Revfy
2016-06-28 21:49 ` Joe Perches
2016-06-28 22:07   ` [kernel-hardening] " Valdis.Kletnieks
2016-06-28 23:54     ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160628134237.910997b2430dfdf4c55b05ee@gmail.com \
    --to=re.emese@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=david.brown@linaro.org \
    --cc=jlayton@poochiereds.net \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rasmusvillemoes.dk \
    --cc=minipli@ld-linux.so \
    --cc=mmarek@suse.com \
    --cc=pageexec@freemail.hu \
    --cc=spender@grsecurity.net \
    --cc=tglx@linutronix.de \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox