lkml.org 
[lkml]   [2009]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 18/30] cr: restore vDSO on i386/x86_64
Quoting Alexey Dobriyan (adobriyan@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@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


\
 
 \ /
  Last update: 2009-04-16 17:31    [W:0.043 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site