[Devel] Re: [PATCH 18/30] cr: restore vDSO on i386/x86_64
Serge E. Hallyn
serue at us.ibm.com
Thu Apr 16 08:27:39 PDT 2009
Quoting Alexey Dobriyan (adobriyan at gmail.com):
> FIXME: check VMA has same parameters.
> FIXME: abort if target kernel has vDSO disabled (?)
> FIXME: restore pages, vDSO is writable after all.
>
> Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
> ---
>
> arch/x86/vdso/vdso32-setup.c | 6 ++
> include/linux/cr.h | 11 +++++
> include/linux/mm.h | 5 +-
> kernel/cr/cr-mm.c | 87 +++++++++++++++++++++++++++++++++++++++++++
> mm/mmap.c | 3 +
> 5 files changed, 110 insertions(+), 2 deletions(-)
>
> --- a/arch/x86/vdso/vdso32-setup.c
> +++ b/arch/x86/vdso/vdso32-setup.c
> @@ -328,6 +328,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long start,
>
> map_compat_vdso(compat);
>
> + if (start) {
> + addr = start;
> + goto map;
> + }
Hmm, is there any safety to be gained by using
arch_get_unmapped_area(NULL, start, PAGE_SIZE, 0, 0);
so as to make sure there is a free page?
> if (compat)
> addr = VDSO_HIGH_BASE;
> else {
> @@ -337,7 +341,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long start,
> goto up_fail;
> }
> }
> -
> +map:
> if (compat_uses_vma || !compat) {
> /*
> * MAYWRITE to allow gdb to COW and set breakpoints
thanks,
-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list