From 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 16 Oct 2007 23:30:12 -0700 Subject: 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 Cc: Roland McGrath Cc: Jakub Jelinek Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: "Luck, Tony" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-ia64/elf.h | 1 + include/asm-ia64/system.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'include/asm-ia64') diff --git a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h index 25f9835d545..f10e29b60b0 100644 --- a/include/asm-ia64/elf.h +++ b/include/asm-ia64/elf.h @@ -192,6 +192,7 @@ extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); #define GATE_EHDR ((const struct elfhdr *) GATE_ADDR) +/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ #define ARCH_DLINFO \ do { \ extern char __kernel_syscall_via_epc[]; \ diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 91bb8e00066..595112bca3c 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h @@ -32,6 +32,8 @@ #include #include +#define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ + struct pci_vector_struct { __u16 segment; /* PCI Segment number */ __u16 bus; /* PCI Bus number */ -- cgit v1.2.3