mips/vdso: Support mremap() for vDSO
authorGuoyun Sun <sunguoyun@loongson.cn>
Wed, 15 Jan 2020 03:35:00 +0000 (11:35 +0800)
committerPaul Burton <paulburton@kernel.org>
Wed, 15 Jan 2020 18:44:14 +0000 (10:44 -0800)
commitad1df95419cc46b4a832cbb537716e3da9a98881
treee6deedf09e8b9c4c92263c8a2af8d39f78010b23
parente8c192011c920517e5578d51c7aff0ecadd25de3
mips/vdso: Support mremap() for vDSO

vDSO VMA address is saved in mm_context for the purpose of using
restorer from vDSO page to return to userspace after signal handling.

In Checkpoint Restore in Userspace (CRIU) project we place vDSO VMA
on restore back to the place where it was on the dump.

Make vDSO code track the VMA address by supplying .mremap() fops
the same way it's done for x86 and arm by:
commit b059a453b1cf ("x86/vdso: Add mremap hook to vm_special_mapping")
commit 739586951b8a ("arm64/vdso: Support mremap() for vDSO").

Signed-off-by: Guoyun Sun <sunguoyun@loongson.cn>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Allison Randal <allison@lohutok.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
arch/mips/vdso/genvdso.c