* [PATCH 17/30] cr: extend arch_setup_additional_pages()
@ 2009-04-10 2:37 Alexey Dobriyan
2009-04-16 15:23 ` Serge E. Hallyn
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2009-04-10 2:37 UTC (permalink / raw)
To: akpm, containers
Cc: xemul, serue, dave, mingo, orenl, hch, torvalds, linux-kernel
Add "start" argument, it will be used to map vDSO to exactly same place
on restart(2).
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/powerpc/include/asm/elf.h | 1 +
arch/powerpc/kernel/vdso.c | 2 +-
arch/s390/include/asm/elf.h | 2 +-
arch/s390/kernel/vdso.c | 2 +-
arch/sh/include/asm/elf.h | 1 +
arch/sh/kernel/vsyscall/vsyscall.c | 2 +-
arch/x86/include/asm/elf.h | 3 ++-
arch/x86/vdso/vdso32-setup.c | 2 +-
fs/binfmt_elf.c | 2 +-
9 files changed, 10 insertions(+), 7 deletions(-)
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -269,6 +269,7 @@ extern int ucache_bsize;
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES
struct linux_binprm;
extern int arch_setup_additional_pages(struct linux_binprm *bprm,
+ unsigned long start,
int uses_interp);
#define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b);
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -184,7 +184,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
* This is called from binfmt_elf, we create the special vma for the
* vDSO and insert it into the mm struct tree
*/
-int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
+int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long start, int uses_interp)
{
struct mm_struct *mm = current->mm;
struct page **vdso_pagelist;
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -205,6 +205,6 @@ do { \
struct linux_binprm;
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
-int arch_setup_additional_pages(struct linux_binprm *, int);
+int arch_setup_additional_pages(struct linux_binprm *, unsigned long, int);
#endif
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -182,7 +182,7 @@ static void vdso_init_cr5(void)
* This is called from binfmt_elf, we create the special vma for the
* vDSO and insert it into the mm struct tree
*/
-int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
+int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long start, int uses_interp)
{
struct mm_struct *mm = current->mm;
struct page **vdso_pagelist;
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -202,6 +202,7 @@ do { \
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES
struct linux_binprm;
extern int arch_setup_additional_pages(struct linux_binprm *bprm,
+ unsigned long start,
int uses_interp);
extern unsigned int vdso_enabled;
--- a/arch/sh/kernel/vsyscall/vsyscall.c
+++ b/arch/sh/kernel/vsyscall/vsyscall.c
@@ -59,7 +59,7 @@ int __init vsyscall_init(void)
}
/* Setup a VMA at program startup for the vsyscall page */
-int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
+int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long start, int uses_interp)
{
struct mm_struct *mm = current->mm;
unsigned long addr;
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -336,9 +336,10 @@ struct linux_binprm;
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
extern int arch_setup_additional_pages(struct linux_binprm *bprm,
+ unsigned long start,
int uses_interp);
-extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
+extern int syscall32_setup_pages(struct linux_binprm *, unsigned long start, int exstack);
#define compat_arch_setup_additional_pages syscall32_setup_pages
extern unsigned long arch_randomize_brk(struct mm_struct *mm);
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -310,7 +310,7 @@ int __init sysenter_setup(void)
}
/* Setup a VMA at program startup for the vsyscall page */
-int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
+int arch_setup_additional_pages(struct linux_binprm *bprm, unsigned long start, int uses_interp)
{
struct mm_struct *mm = current->mm;
unsigned long addr;
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -945,7 +945,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
set_binfmt(&elf_format);
#ifdef ARCH_HAS_SETUP_ADDITIONAL_PAGES
- retval = arch_setup_additional_pages(bprm, !!elf_interpreter);
+ retval = arch_setup_additional_pages(bprm, 0, !!elf_interpreter);
if (retval < 0) {
send_sig(SIGKILL, current, 0);
goto out;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 17/30] cr: extend arch_setup_additional_pages()
2009-04-10 2:37 [PATCH 17/30] cr: extend arch_setup_additional_pages() Alexey Dobriyan
@ 2009-04-16 15:23 ` Serge E. Hallyn
0 siblings, 0 replies; 2+ messages in thread
From: Serge E. Hallyn @ 2009-04-16 15:23 UTC (permalink / raw)
To: Alexey Dobriyan
Cc: akpm, containers, xemul, dave, mingo, orenl, hch, torvalds,
linux-kernel
Quoting Alexey Dobriyan (adobriyan@gmail.com):
> Add "start" argument, it will be used to map vDSO to exactly same place
> on restart(2).
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
IIRC the first (bprm) argument is actually completely unused. So in my
version of this patch (in mid-march) I dropped that argument.
> ---
>
> arch/powerpc/include/asm/elf.h | 1 +
> arch/powerpc/kernel/vdso.c | 2 +-
> arch/s390/include/asm/elf.h | 2 +-
> arch/s390/kernel/vdso.c | 2 +-
> arch/sh/include/asm/elf.h | 1 +
> arch/sh/kernel/vsyscall/vsyscall.c | 2 +-
> arch/x86/include/asm/elf.h | 3 ++-
> arch/x86/vdso/vdso32-setup.c | 2 +-
You didn't get arch/x86/vdso/vma.c.
But otherwise:
Acked-by: Serge Hallyn <serue@us.ibm.com>
thanks,
-serge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-16 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 2:37 [PATCH 17/30] cr: extend arch_setup_additional_pages() Alexey Dobriyan
2009-04-16 15:23 ` Serge E. Hallyn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox