Re: [PATCH 18/30] cr: restore vDSO on i386/x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Alexey Dobriyan (adobriyan@xxxxxxxxx):
> 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@xxxxxxxxx>
> ---
> 
>  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@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux