diff options
author | Olaf Hering <olaf@aepfle.de> | 2007-10-17 02:30:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:00 -0400 |
commit | 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 (patch) | |
tree | 791843f8cd609cb626a65c4004009084d87170d4 /include/asm-sh | |
parent | f77e34987070a20e4b3e06b868cb39eb73670467 (diff) |
increase AT_VECTOR_SIZE to terminate saved_auxv properly
include/asm-powerpc/elf.h has 6 entries in ARCH_DLINFO. fs/binfmt_elf.c
has 14 unconditional NEW_AUX_ENT entries and 2 conditional NEW_AUX_ENT
entries. So in the worst case, saved_auxv does not get an AT_NULL entry at
the end.
The saved_auxv array must be terminated with an AT_NULL entry. Make the
size of mm_struct->saved_auxv arch dependend, based on the number of
ARCH_DLINFO entries.
Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Roland McGrath <roland@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/elf.h | 1 | ||||
-rw-r--r-- | include/asm-sh/system.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-sh/elf.h b/include/asm-sh/elf.h index 43ca244564b1..12cc4b392bf0 100644 --- a/include/asm-sh/elf.h +++ b/include/asm-sh/elf.h | |||
@@ -133,6 +133,7 @@ extern void __kernel_vsyscall; | |||
133 | #define VDSO_BASE ((unsigned long)current->mm->context.vdso) | 133 | #define VDSO_BASE ((unsigned long)current->mm->context.vdso) |
134 | #define VDSO_SYM(x) (VDSO_BASE + (unsigned long)(x)) | 134 | #define VDSO_SYM(x) (VDSO_BASE + (unsigned long)(x)) |
135 | 135 | ||
136 | /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ | ||
136 | #define ARCH_DLINFO \ | 137 | #define ARCH_DLINFO \ |
137 | do { \ | 138 | do { \ |
138 | if (vdso_enabled) \ | 139 | if (vdso_enabled) \ |
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 9d849e6df268..4faa2fb88616 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -15,6 +15,7 @@ | |||
15 | struct task_struct *__switch_to(struct task_struct *prev, | 15 | struct task_struct *__switch_to(struct task_struct *prev, |
16 | struct task_struct *next); | 16 | struct task_struct *next); |
17 | 17 | ||
18 | #define AT_VECTOR_SIZE_ARCH 1 /* entries in ARCH_DLINFO */ | ||
18 | /* | 19 | /* |
19 | * switch_to() should switch tasks to task nr n, first | 20 | * switch_to() should switch tasks to task nr n, first |
20 | */ | 21 | */ |