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: 378595499 Bug: 378498803 Bug: 378382251 Bug: 378401065 Bug: 365566776 Bug: 365177458 Bug: 356480574 Change-Id: Ice27271290c12656bb12622dd0a9dfa744a4c730 [ Drop changes to include/linux/pgsize_migration.h, which were pulled in previous resolution of include/linux/pgsize_migration_inline.h - Kalesh Singh ] Signed-off-by:Kalesh Singh <kaleshsingh@google.com> (cherry picked from commit 6dafb0a5)
Loading
Please sign in to comment