kernel-ark/arch
Laurent Dufour 2ae416b142 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>
2015-06-24 17:49:41 -07:00
..
alpha mm: new mm hook framework 2015-06-24 17:49:41 -07:00
arc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
arm mm: new mm hook framework 2015-06-24 17:49:41 -07:00
arm64 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
avr32 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
blackfin mm: new mm hook framework 2015-06-24 17:49:41 -07:00
c6x mm: new mm hook framework 2015-06-24 17:49:41 -07:00
cris mm: new mm hook framework 2015-06-24 17:49:41 -07:00
frv mm: new mm hook framework 2015-06-24 17:49:41 -07:00
hexagon mm: new mm hook framework 2015-06-24 17:49:41 -07:00
ia64 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
m32r mm: new mm hook framework 2015-06-24 17:49:41 -07:00
m68k mm: new mm hook framework 2015-06-24 17:49:41 -07:00
metag mm: new mm hook framework 2015-06-24 17:49:41 -07:00
microblaze mm: new mm hook framework 2015-06-24 17:49:41 -07:00
mips mm: new mm hook framework 2015-06-24 17:49:41 -07:00
mn10300 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
nios2 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
openrisc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
parisc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
powerpc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
s390 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
score mm: new mm hook framework 2015-06-24 17:49:41 -07:00
sh mm: new mm hook framework 2015-06-24 17:49:41 -07:00
sparc mm: new mm hook framework 2015-06-24 17:49:41 -07:00
tile mm: new mm hook framework 2015-06-24 17:49:41 -07:00
um mm: new mm hook framework 2015-06-24 17:49:41 -07:00
unicore32 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
x86 mm: new mm hook framework 2015-06-24 17:49:41 -07:00
xtensa mm: new mm hook framework 2015-06-24 17:49:41 -07:00
.gitignore
Kconfig