ANDROID: 16K: Fix swapfile header
The swap header is usually in the first page, with the magic in the
last 10 bytes of the page. In the emulated mode, mkswap tools might
place the magic on the last 10 bytes of __PAGE_SIZE-ed page. Check if
this is the case and place the magic on the first page and clear the
magic from the end of the emulated page if it was found there; since
the kernel still uses a 4KiB page size.
Bug: 366098040
Test: atest vts_ltp_test_x86_64
Change-Id: I0882a26b2e8a490fa82f490b1748903a25ff5652
Signed-off-by:
Kalesh Singh <kaleshsingh@google.com>
Loading
Please sign in to comment