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.
Showing the changes to kernel/livepatch (1 of 4 files). Show all
Unified · Split
| @@ -309,7 +309,7 @@ static int klp_write_object_relocations(struct module *pmod, · 308 unmodified lines | |||
| 309 | break; | 309 | break; |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | module_enable_ro(pmod); | 312 | module_enable_ro(pmod, true); |
| 313 | return ret; | 313 | return ret; |
| 314 | } | 314 | } |
| 315 | 315 | ||