[uml-user] [PATCH v4 1/2] mm: Introducing arch_remap hook

2015-03-28 Thread Laurent Dufour
Some architecture would like to be triggered when a memory area is moved through the mremap system call. This patch is introducing a new arch_remap mm hook which is placed in the path of mremap, and is called before the old area is unmapped (and the arch_unmap hook is called). The architectures w

[uml-user] [PATCH v4 0/2] Tracking user space vDSO remaping

2015-03-28 Thread Laurent Dufour
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 th

[uml-user] [PATCH 0/4] kbuild: refactor Makefile inclusion

2015-03-28 Thread Masahiro Yamada
Masahiro Yamada (4): kbuild: use relative path to include Makefile kbuild: use relative path more to include Makefile kbuild: include $(src)/Makefile rather than $(obj)/Makefile kbuild: ia64: use $(src)/Makefile.gate rather than particular path Makefile | 22 ++---

Re: [uml-user] [PATCH v3 2/2] powerpc/mm: Tracking vDSO remap

2015-03-28 Thread Benjamin Herrenschmidt
On Thu, 2015-03-26 at 10:43 +0100, Ingo Molnar wrote: > * Benjamin Herrenschmidt wrote: > > > On Wed, 2015-03-25 at 19:36 +0100, Ingo Molnar wrote: > > > * Ingo Molnar wrote: > > > > > > > > +#define __HAVE_ARCH_REMAP > > > > > +static inline void arch_remap(struct mm_struct *mm, > > > > > +

[uml-user] [PATCH v4 2/2] powerpc/mm: Tracking vDSO remap

2015-03-28 Thread Laurent Dufour
Some processes (CRIU) are moving the vDSO area using the mremap system call. As a consequence the kernel reference to the vDSO base address is no more valid and the signal return frame built once the vDSO has been moved is not pointing to the new sigreturn address. This patch handles vDSO remappin

Re: [uml-user] [PATCH v4 2/2] powerpc/mm: Tracking vDSO remap

2015-03-28 Thread Laurent Dufour
On 26/03/2015 19:55, Ingo Molnar wrote: > > * Laurent Dufour wrote: > >> +{ >> +unsigned long vdso_end, vdso_start; >> + >> +if (!mm->context.vdso_base) >> +return; >> +vdso_start = mm->context.vdso_base; >> + >> +#ifdef CONFIG_PPC64 >> +/* Calling is_32bit_task() imp

Re: [uml-user] [PATCH v3 2/2] powerpc/mm: Tracking vDSO remap

2015-03-28 Thread Laurent Dufour
On 26/03/2015 15:17, Ingo Molnar wrote: > > * Laurent Dufour wrote: > >>> I argue we should use the right condition to clear vdso_base: if >>> the vDSO gets at least partially unmapped. Otherwise there's >>> little point in the whole patch: either correctly track whether >>> the vDSO is OK, o

Re: [uml-user] [PATCH v4 2/2] powerpc/mm: Tracking vDSO remap

2015-03-28 Thread Ingo Molnar
* Laurent Dufour wrote: > +{ > + unsigned long vdso_end, vdso_start; > + > + if (!mm->context.vdso_base) > + return; > + vdso_start = mm->context.vdso_base; > + > +#ifdef CONFIG_PPC64 > + /* Calling is_32bit_task() implies that we are dealing with the > + * curre

[uml-user] [PATCH 2/4] kbuild: use relative path more to include Makefile

2015-03-28 Thread Masahiro Yamada
Prior to this commit, it was impossible to use relative path to include Makefiles from the top level Makefile because the option "--include-dir=$(srctree)" becomes effective when Make enters into sub Makefiles. To use relative path in any places, this commit moves the option above the "sub-make" t