Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1442838

Re: [PATCH v2 1/3] Add the initify gcc plugin

From Emese Revfy <re.emese@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/3] Add the initify gcc plugin
Date 2016-07-13 22:50 +0200
Message-ID <rUzgu-87F-33@gated-at.bofh.it> (permalink)
References <rRlD3-3xx-7@gated-at.bofh.it> <rRlD3-3xx-11@gated-at.bofh.it> <rUbQR-Xn-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 12 Jul 2016 15:45:56 -0400
Kees Cook <keescook@chromium.org> wrote:

> On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy <re.emese@gmail.com> 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?

I don't modify the existing attributes. I just add a new __init/__exit when
a function hasn't a section attribute yet.
There are three cases:
 * when the function is called only by __init functions then the plugin adds
   the __init attribute
 * when the function is called only by __exit functions then the plugin adds
   the __exit attribute
 * when the function is called by __init and __exit functions too then the
   plugin adds the __exit attribute.
The last case causes the false positive(?) message of the section mismatch.

-- 
Emese

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 1/3] Add the initify gcc plugin Kees Cook <keescook@chromium.org> - 2016-07-12 21:50 +0200
  Re: [PATCH v2 1/3] Add the initify gcc plugin Kees Cook <keescook@chromium.org> - 2016-07-12 22:10 +0200
    Re: [PATCH v2 1/3] Add the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-07-13 22:30 +0200
  Re: [PATCH v2 1/3] Add the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-07-12 22:10 +0200
  Re: [PATCH v2 1/3] Add the initify gcc plugin Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-13 00:20 +0200
    Re: [PATCH v2 1/3] Add the initify gcc plugin Kees Cook <keescook@chromium.org> - 2016-07-13 00:40 +0200
      Re: [PATCH v2 1/3] Add the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-07-13 23:30 +0200
  Re: [PATCH v2 1/3] Add the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-07-13 22:50 +0200
    Re: [PATCH v2 1/3] Add the initify gcc plugin Kees Cook <keescook@chromium.org> - 2016-07-13 23:10 +0200

csiph-web