ANDROID: 16K: Align vsyscall mapping size to a 16kB multiple

To avoid an not 16kb-aligned end address in the vsyscall mapping,
make the mapping size __MAX_PAGE_SIZE.

Bug: 383389337
Bug: 356729201
Change-Id: Ia924ec0f18cb51ef8c84915b29e892e70a7173b3
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
Kalesh Singh
2024-07-31 20:58:19 -07:00
committed by Carlos Llamas
parent 4395898bf5
commit 65df6a39b7

View File

@@ -32,6 +32,7 @@
#include <linux/mm_types.h>
#include <linux/syscalls.h>
#include <linux/ratelimit.h>
#include <linux/page_size_compat.h>
#include <asm/vsyscall.h>
#include <asm/unistd.h>
@@ -284,7 +285,7 @@ static const struct vm_operations_struct gate_vma_ops = {
};
static struct vm_area_struct gate_vma __ro_after_init = {
.vm_start = VSYSCALL_ADDR,
.vm_end = VSYSCALL_ADDR + PAGE_SIZE,
.vm_end = VSYSCALL_ADDR + __MAX_PAGE_SIZE,
.vm_page_prot = PAGE_READONLY_EXEC,
.vm_flags = VM_READ | VM_EXEC,
.vm_ops = &gate_vma_ops,