1 From: Jan Blunck <jblunck@suse.de>
2 Subject: Dump elf headers to core per default
4 This patch changes the default of /proc/self/coredump_filter to write the elf
5 header of shared objects and the executable itself to the core file. This
6 change is necessary to read the build-ids generated by GCC from the produced
7 core files. These core files might not be readable by anncient versions of
10 Signed-off-by: Jan Blunck <jblunck@suse.de>
12 include/linux/sched.h | 5 +++--
13 1 file changed, 3 insertions(+), 2 deletions(-)
15 --- a/include/linux/sched.h
16 +++ b/include/linux/sched.h
17 @@ -408,8 +408,9 @@ extern int get_dumpable(struct mm_struct
18 #define MMF_DUMP_FILTER_BITS 5
19 #define MMF_DUMP_FILTER_MASK \
20 (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
21 -#define MMF_DUMP_FILTER_DEFAULT \
22 - ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED))
23 +#define MMF_DUMP_FILTER_DEFAULT \
24 + ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED) | \
25 + (1 << MMF_DUMP_ELF_HEADERS))
27 struct sighand_struct {