[PATCH] arm64: vdso: Split native/compat mremap callbacks
From: Mark Rutland
Date: Wed Sep 16 2026 - 06:03:32 EST
Currently the native and compat VDSOs share a common vdso_mremap()
function which is used as their vm_special_mapping::mremap callback.
In subsequent patches the native and compat VDSOs will need distinct
mremap logic, which will be easier to manage with separate functions.
Give the compat VDSO its own aarch32_vdso_mremap() function. For now
this is identical to vdso_mremap().
At the same time, fix the odd whitespace in the vdso_mremap() prototype.
There should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
---
arch/arm64/kernel/vdso.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 592dd8668de46..089a70d962204 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -58,7 +58,7 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = {
};
static int vdso_mremap(const struct vm_special_mapping *sm,
- struct vm_area_struct *new_vma)
+ struct vm_area_struct *new_vma)
{
current->mm->context.vdso = (void *)new_vma->vm_start;
@@ -162,6 +162,14 @@ static int aarch32_sigpage_mremap(const struct vm_special_mapping *sm,
return 0;
}
+static int aarch32_vdso_mremap(const struct vm_special_mapping *sm,
+ struct vm_area_struct *new_vma)
+{
+ current->mm->context.vdso = (void *)new_vma->vm_start;
+
+ return 0;
+}
+
static struct vm_special_mapping aarch32_vdso_maps[] = {
[AA32_MAP_VECTORS] = {
.name = "[vectors]", /* ABI */
@@ -174,7 +182,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = {
},
[AA32_MAP_VDSO] = {
.name = "[vdso]",
- .mremap = vdso_mremap,
+ .mremap = aarch32_vdso_mremap,
},
};
--
2.30.2