Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432316
| From | Jessica Yu <jeyu@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Freeing alternatives sections after module init? |
| Date | 2016-06-27 23:10 +0200 |
| Message-ID | <rOLX4-5DX-25@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hi Rusty, I noticed that the module loader keeps .altinstructions and .altinstr_replacement (which are normally freed after kernel init) in core memory after module init, so these sections are never freed for modules. In fact, the module loader seems to keep a number of sections normally marked between __init_begin and __init_end (which are then freed in free_initmem()) in module core memory, for example on x86, there's also .parainstructions and .altinstr_aux. I was just wondering if this discrepancy was intentional :-) Shouldn't these sections be freed after init? Though it probably doesn't hurt to keep some of these sections in memory, .altinstr_replacement is (for whatever reason) an executable section, and is technically not needed anymore after apply_alternatives() copies the replacement instructions, so it might be good to free it. Thanks, Jessica
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Freeing alternatives sections after module init? Jessica Yu <jeyu@redhat.com> - 2016-06-27 23:10 +0200 Re: Freeing alternatives sections after module init? Rusty Russell <rusty@rustcorp.com.au> - 2016-06-28 23:30 +0200
csiph-web