Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441693
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/3] Add the initify gcc plugin |
| Date | 2016-07-12 21:50 +0200 |
| Message-ID | <rUbQR-Xn-13@gated-at.bofh.it> (permalink) |
| References | <rRlD3-3xx-7@gated-at.bofh.it> <rRlD3-3xx-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 4, 2016 at 7:40 PM, Emese Revfy <re.emese@gmail.com> wrote: > The kernel already has a mechanism to free up code and data memory that > is only used during kernel or module initialization. > This plugin will teach the compiler to find more such code and data that > can be freed after initialization. > It has two passes. The first one tries to find all functions that > can be become __init/__exit. The second one moves string constants > (local variables and function string arguments marked by > the nocapture attribute) only referenced in __init/__exit functions > to the __initconst/__exitconst sections. > It reduces memory usage. This plugin can be useful for embedded systems. > > 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? > The instrumentation pass of the latent_entropy plugin must run after > the initify plugin to increase coverage. > > Signed-off-by: Emese Revfy <re.emese@gmail.com> Thanks for sending this! I'll get it added to my tree for some 0day build testing, and then get it into my -next tree. -Kees -- Kees Cook Chrome OS & Brillo Security
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll 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