Commit 3feaf4d5 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

ANDROID: 16K: Disable kernel APIs indexed by PFNs



When emulating the userspace page size, /proc/*/pagemap
doesn't support PFNs since it is not guaranteed that
the PFNs of the virtually contiguous pages are also
contiguous physically and therefore cannot be collapsed
for purposes of the page size emulation.

On x86_64 16K devices, PFN bit of pagemap entries are
always zero, hence disable APIs that consume PFNs
from pagemap:
  - /proc/kpagecount
  - /proc/kpageflags
  - /proc/kpagecgroup
  - /sys/kernel/mm/page_idle/bitmap

Bug: 385167611
Test: atest vts_ltp_test_x86_64:syscalls.msync04_64bit#syscalls.msync04_64bit
Test: atest vts_ltp_test_x86_64:syscalls.mmap12_64bit#syscalls.mmap12_64bit
Test: atest libmeminfo_test
Test: atest bionic-unit-tests:DlExtRelroSharingTest#VerifyMemorySaving
Note: bionic-unit-tests must be run as root (add require_root: true)
Change-Id: I214c8737c6f7385346436769f144c5ecd429a5b7
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent baad4c95
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment