|
Message-Id: <20160628134237.910997b2430dfdf4c55b05ee@gmail.com> Date: Tue, 28 Jun 2016 13:42:37 +0200 From: Emese Revfy <re.emese@...il.com> To: kernel-hardening@...ts.openwall.com Cc: pageexec@...email.hu, spender@...ecurity.net, mmarek@...e.com, keescook@...omium.org, linux-kernel@...r.kernel.org, yamada.masahiro@...ionext.com, linux-kbuild@...r.kernel.org, minipli@...linux.so, linux@...linux.org.uk, catalin.marinas@....com, linux@...musvillemoes.dk, david.brown@...aro.org, benh@...nel.crashing.org, tglx@...utronix.de, akpm@...ux-foundation.org, jlayton@...chiereds.net, arnd@...db.de Subject: Re: [PATCH v1 0/2] Introduce the initify gcc plugin On Tue, 28 Jun 2016 13:34:07 +0200 Emese Revfy <re.emese@...il.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
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.