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>
Showing
- fs/binfmt_elf.c 3 additions, 0 deletionsfs/binfmt_elf.c
- include/asm-alpha/elf.h 1 addition, 0 deletionsinclude/asm-alpha/elf.h
- include/asm-alpha/system.h 1 addition, 0 deletionsinclude/asm-alpha/system.h
- include/asm-ia64/elf.h 1 addition, 0 deletionsinclude/asm-ia64/elf.h
- include/asm-ia64/system.h 2 additions, 0 deletionsinclude/asm-ia64/system.h
- include/asm-powerpc/elf.h 1 addition, 0 deletionsinclude/asm-powerpc/elf.h
- include/asm-powerpc/system.h 1 addition, 0 deletionsinclude/asm-powerpc/system.h
- include/asm-sh/elf.h 1 addition, 0 deletionsinclude/asm-sh/elf.h
- include/asm-sh/system.h 1 addition, 0 deletionsinclude/asm-sh/system.h
- include/asm-x86/elf_32.h 1 addition, 0 deletionsinclude/asm-x86/elf_32.h
- include/asm-x86/system_32.h 1 addition, 0 deletionsinclude/asm-x86/system_32.h
- include/linux/auxvec.h 3 additions, 1 deletioninclude/linux/auxvec.h
- include/linux/elf.h 0 additions, 1 deletioninclude/linux/elf.h
- include/linux/mm_types.h 6 additions, 1 deletioninclude/linux/mm_types.h
Loading
Please register or sign in to comment