History

modules: add ro_after_init support

Add ro_after_init support for modules by adding a new page-aligned section in the module layout (after rodata) for ro_after_init data and enabling RO protection for that section after module init runs.

Jessica Yu committed 10 years ago

Commit 444d13f1 parent bdc9f374 files · +60 −15Browse files

Showing the changes to kernel/livepatch (1 of 4 files). Show all

Unified · Split

kernel/livepatch/core.c+1−1
@@ -309,7 +309,7 @@ static int klp_write_object_relocations(struct module *pmod, · 308 unmodified lines
309309 break;
310310 }
311311
312− module_enable_ro(pmod);
312+ module_enable_ro(pmod, true);
313313 return ret;
314314 }
315315