[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090416152739.GA19712@us.ibm.com>
Date: Thu, 16 Apr 2009 10:27:39 -0500
From: "Serge E. Hallyn" <serue@...ibm.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: akpm@...ux-foundation.org, containers@...ts.linux-foundation.org,
xemul@...allels.com, dave@...ux.vnet.ibm.com, mingo@...e.hu,
orenl@...columbia.edu, hch@...radead.org,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 18/30] cr: restore vDSO on i386/x86_64
Quoting Alexey Dobriyan (adobriyan@...il.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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists