ANDROID: 16K: Fix vm_flags conflicts from mseal
With the introduction of the mseal syscall, bit 63 of the 64-bit
vm_flags is now used to indicate that a VMA has been sealed.
Page size migration mitigations for 16kB uses bits 63-60 to
represent VMA ELF padding.
This conflict lead to VMAs with ELF padding being misinterpreted
as "seal" -- meaning that operations; such as unmapping, moving,
modifying via MAP_FIXED or resizing by mremap; all fail on VMAs
containing ELF padding. In effect, causing boot to fail.
This was caught on the x86_64 16kB emulator, but would have failed
on any device (4kB page sized) that has a page agnostic user space
and the mseal syscall available.
Move filemap fixup flag __VM_NO_COMPAT for x86_64 16kB emulation
to bit 58, which allows moving the ELF padding representation to
bits [62-59].
Bug: 356480574
Change-Id: Ice27271290c12656bb12622dd0a9dfa744a4c730
Signed-off-by:
Kalesh Singh <kaleshsingh@google.com>
Loading