aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-alpha
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2007-10-17 02:30:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:43:00 -0400
commit4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 (patch)
tree791843f8cd609cb626a65c4004009084d87170d4 /include/asm-alpha
parentf77e34987070a20e4b3e06b868cb39eb73670467 (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-alpha')
-rw-r--r--include/asm-alpha/elf.h1
-rw-r--r--include/asm-alpha/system.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-alpha/elf.h b/include/asm-alpha/elf.h
index 6c2d78fba264..4b518e3b952c 100644
--- a/include/asm-alpha/elf.h
+++ b/include/asm-alpha/elf.h
@@ -155,6 +155,7 @@ extern int alpha_l1d_cacheshape;
155extern int alpha_l2_cacheshape; 155extern int alpha_l2_cacheshape;
156extern int alpha_l3_cacheshape; 156extern int alpha_l3_cacheshape;
157 157
158/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
158#define ARCH_DLINFO \ 159#define ARCH_DLINFO \
159 do { \ 160 do { \
160 NEW_AUX_ENT(AT_L1I_CACHESHAPE, alpha_l1i_cacheshape); \ 161 NEW_AUX_ENT(AT_L1I_CACHESHAPE, alpha_l1i_cacheshape); \
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index 620c4d86cbf4..fd9dc889f36c 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -48,6 +48,7 @@
48 48
49#ifndef __ASSEMBLY__ 49#ifndef __ASSEMBLY__
50#include <linux/kernel.h> 50#include <linux/kernel.h>
51#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */
51 52
52/* 53/*
53 * This is the logout header that should be common to all platforms 54 * This is the logout header that should be common to all platforms