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 include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -286,6 +286,7 @@ typedef struct elf64_phdr { · 285 unmodified lines | |||
| 286 | #define SHF_ALLOC 0x2 | 286 | #define SHF_ALLOC 0x2 |
| 287 | #define SHF_EXECINSTR 0x4 | 287 | #define SHF_EXECINSTR 0x4 |
| 288 | #define SHF_RELA_LIVEPATCH 0x00100000 | 288 | #define SHF_RELA_LIVEPATCH 0x00100000 |
| 289 | #define SHF_RO_AFTER_INIT 0x00200000 | ||
| 289 | #define SHF_MASKPROC 0xf0000000 | 290 | #define SHF_MASKPROC 0xf0000000 |
| 290 | 291 | ||
| 291 | /* special section indexes */ | 292 | /* special section indexes */ |