lkml.org 
[lkml]   [2016]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] Add the initify gcc plugin
On Tue, 12 Jul 2016 16:05:45 -0400
Kees Cook <keescook@chromium.org> wrote:

> /*
> * The initify gcc-plugin attempts to identify const arguments that are only
> * used during init (see __init), so they can be moved to the .init.rodata
> * section. If an argument is passed to a non-init function, it must
> * normally be assumed that such an argument has been captured by that
> * function and may be used in the future when .init has been unmapped from
> * memory. In order to identify functions that are confirmed to not capture
> * their arguments, the __nocapture() attribute is used so that initify can
> * better identify candidate variables.
> */
> #ifdef INITIFY_PLUGIN
> # define __nocapture(...) __attribute__((nocapture(__VA_ARGS__)))
> #endif

Thanks, I'll take it in the next patch set with some additions (the attribute
also handles __exit functions and the plugin does other things e.g., it can
identify candidate init/exit functions and move them automatically to init.text/exit.text).

--
Emese

\
 
 \ /
  Last update: 2016-07-13 23:01    [W:0.076 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site