]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm: new mm hook framework
authorLaurent Dufour <ldufour@linux.vnet.ibm.com>
Wed, 24 Jun 2015 23:56:16 +0000 (16:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2015 00:49:41 +0000 (17:49 -0700)
commit2ae416b142b625c58c9ccb039aa3ef48ad0e9bae
treeee3c5c63076e9b21e17c168ffb209b53bef91362
parente81f2d22370f8231cb7f13f454bcc8c0eb4e23f2
mm: new mm hook framework

CRIU is recreating the process memory layout by remapping the checkpointee
memory area on top of the current process (criu).  This includes remapping
the vDSO to the place it has at checkpoint time.

However some architectures like powerpc are keeping a reference to the
vDSO base address to build the signal return stack frame by calling the
vDSO sigreturn service.  So once the vDSO has been moved, this reference
is no more valid and the signal frame built later are not usable.

This patch serie is introducing a new mm hook framework, and a new
arch_remap hook which is called when mremap is done and the mm lock still
hold.  The next patch is adding the vDSO remap and unmap tracking to the
powerpc architecture.

This patch (of 3):

This patch introduces a new set of header file to manage mm hooks:
- per architecture empty header file (arch/x/include/asm/mm-arch-hooks.h)
- a generic header (include/linux/mm-arch-hooks.h)

The architecture which need to overwrite a hook as to redefine it in its
header file, while architecture which doesn't need have nothing to do.

The default hooks are defined in the generic header and are used in the
case the architecture is not defining it.

In a next step, mm hooks defined in include/asm-generic/mm_hooks.h should
be moved here.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
31 files changed:
arch/alpha/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/arc/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/arm/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/arm64/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/avr32/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/blackfin/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/c6x/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/cris/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/frv/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/hexagon/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/ia64/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/m32r/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/m68k/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/metag/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/microblaze/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/mips/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/mn10300/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/nios2/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/openrisc/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/parisc/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/powerpc/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/s390/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/score/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/sh/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/sparc/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/tile/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/um/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/unicore32/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/x86/include/asm/mm-arch-hooks.h [new file with mode: 0644]
arch/xtensa/include/asm/mm-arch-hooks.h [new file with mode: 0644]
include/linux/mm-arch-hooks.h [new file with mode: 0644]