KAMEZAWA Hiroyuki 341c87bf34 elf: limit max map count to safe value
With ELF, at generating coredump, some more headers other than used
vmas are added.

When max_map_count == 65536, a core generated by following kinds of
code can be unreadable because the number of ELF's program header is
written in 16bit in Ehdr (please see elf.h) and the number overflows.

==
	... = mmap(); (munmap, mprotect, etc...)
	if (failed)
		abort();
==

This can happen in mmap/munmap/mprotect/etc...which calls split_vma().

I think 65536 is not safe as _default_ and reduce it to 65530 is good
for avoiding unexpected corrupted core.

Anyway, max_map_count can be enlarged by sysctl if a user is brave..

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Jakub Jelinek <jakub@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-30 18:55:59 -07:00
..
2009-06-17 00:36:36 -04:00
2009-06-11 21:36:14 -04:00
2009-06-30 13:30:44 -07:00
2009-06-11 21:36:01 -04:00
2009-06-11 21:36:01 -04:00
2009-06-11 21:36:14 -04:00
2009-06-24 08:15:24 -04:00
2009-05-15 11:24:59 -05:00
2009-06-11 21:36:07 -04:00
2009-06-17 00:36:36 -04:00
2009-06-12 10:02:03 -05:00
2009-06-11 21:36:07 -04:00
2009-06-11 21:36:15 -04:00
2009-06-11 21:36:16 -04:00
2009-06-11 21:36:11 -04:00
2009-05-22 18:40:59 +10:00
2009-06-24 17:02:42 -04:00
2009-06-15 21:44:43 -07:00
2009-06-24 08:17:05 -04:00
2009-06-15 21:44:43 -07:00
2009-06-11 21:36:13 -04:00
2009-06-11 21:36:12 -04:00
2009-06-14 17:58:25 -07:00
2009-06-11 21:36:07 -04:00
2009-06-11 21:36:07 -04:00
2009-06-17 00:36:37 -04:00
2009-06-18 13:03:46 -07:00
2009-06-30 18:55:58 -07:00
2008-12-31 18:07:43 -05:00
2009-01-03 11:45:54 -08:00
2009-06-11 21:36:06 -04:00
2009-06-18 13:03:41 -07:00
2009-03-31 23:00:26 -04:00
2009-06-11 21:36:07 -04:00
2009-06-11 21:36:11 -04:00
2009-04-07 08:31:16 -07:00
2009-04-20 23:02:52 -04:00
2009-02-18 15:37:53 -08:00
2009-06-11 21:36:02 -04:00