From 65df6a39b7e2ce56e607c70e070b8dc6ec91fbf8 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Wed, 31 Jul 2024 20:58:19 -0700 Subject: [PATCH] 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 --- arch/x86/entry/vsyscall/vsyscall_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index 2fb7d53cf333..5949fc117d9a 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -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,