Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86, vmlinux.lds.S: Page align RO data for xo text
RO data starts right after the kernel text. If the kernel text doesn’t end exactly on a 2MB page boundary, then the last page of text will share a page with the RO data. This prevents all of the text being set as execute-only, since it would make the RO data not readable. So page align the start of the RO data when CONFIG_XO_TEXT so this does not happen. This usually results in the last page of kernel text being a 4k page instead of a 2MB one. The RO data could be 2MB aligned to avoid this, but at the cost of extra memory usage. So have it be a 4k page, as it is the compromise PTI used when setting some pages non-global. Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
- Loading branch information