Re: [PATCH 6/6] mm: Forbid splitting special mappings

From: Will Deacon
Date: Fri Jan 22 2021 - 08:00:26 EST


On Tue, Oct 13, 2020 at 02:34:16AM +0100, Dmitry Safonov wrote:
> Don't allow splitting of vm_special_mapping's.
> It affects vdso/vvar areas. Uprobes have only one page in xol_area so
> they aren't affected.
>
> Those restrictions were enforced by checks in .mremap() callbacks.
> Restrict resizing with generic .split() callback.
>
> Signed-off-by: Dmitry Safonov <dima@xxxxxxxxxx>
> ---
> arch/arm/kernel/vdso.c | 9 ---------
> arch/arm64/kernel/vdso.c | 41 +++------------------------------------
> arch/mips/vdso/genvdso.c | 4 ----
> arch/s390/kernel/vdso.c | 11 +----------
> arch/x86/entry/vdso/vma.c | 17 ----------------
> mm/mmap.c | 12 ++++++++++++
> 6 files changed, 16 insertions(+), 78 deletions(-)

For arm64:

Acked-by: Will Deacon <will@xxxxxxxxxx>

Will