[PATCH 2/4] powerpc/mm: Handle VDSO unmapping via close() rather than arch_unmap()
Liam R. Howlett
Liam.Howlett at oracle.com
Fri Aug 9 04:08:29 AEST 2024
* Jeff Xu <jeffxu at google.com> [240807 23:37]:
> On Wed, Aug 7, 2024 at 8:21 PM Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
> >
> > On Wed, 7 Aug 2024 at 16:20, Liam R. Howlett <Liam.Howlett at oracle.com> wrote:
> > >
> > > Okay, I'm going to try one more time here. You are suggesting to have a
> > > conf flag to leave the vdso pointer unchanged when it is unmapped.
> > > Having the close behind the conf option will not prevent it from being
> > > unmapped or mapped over, so what you are suggesting is have a
> > > configuration option that leaves a pointer, mm->context.vdso, to be
> > > unsafe if it is unmapped if you disable checkpoint restore.
> >
> This is a new point that I didn't realize before, if we are going to handle
> unmap vdso safely, yes, this is a bugfix that should be applied everywhere
> for all arch, without CHECKPOINT_RESTORE config.
>
> Do we need to worry about mmap(fixed) ? which can have the same effect
> as mremap.
Yes, but it should be handled by vm_ops->close() when MAP_FIXED unmaps
the vdso. Note that you cannot MAP_FIXED over half of the vma as the
vm_ops->may_split() is special_mapping_split(), which just returns
-EINVAL.
Thanks,
Liam
More information about the Linuxppc-dev
mailing list