From: Andi Kleen <ak@muc.de>
Some x86-64 users were complaining that coredumps >2GB don't work.
This will enable large coredump for everybody. Apparently the 32bit
gdb/binutils cannot handle them, but I hear the binutils people are working
on fixing that. I doubt it will harm people - unreadable coredumps are not
worse than no coredump and it won't make any difference in space usage if
you get a 1.99GB or a 2.5GB coredump. So just enable it unconditionally.
If it should be really a problem for 32bit the rlimit defaults in
resource.h could be changed.
For file systems that don't support O_LARGEFILE you should just get an
truncated coredumps for big address spaces.
goto fail_unlock;
format_corename(corename, core_pattern, signr);
- file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
+ file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE, 0600);
if (IS_ERR(file))
goto fail_unlock;
inode = file->f_dentry->d_inode;