android_kernel_samsung_univ.../fs
Dave Kleikamp 878f37efac coredump: Ensure proper size of sparse core files
[ Upstream commit 4d22c75d4c7b5c5f4bd31054f09103ee490878fd ]

If the last section of a core file ends with an unmapped or zero page,
the size of the file does not correspond with the last dump_skip() call.
gdb complains that the file is truncated and can be confusing to users.

After all of the vma sections are written, make sure that the file size
is no smaller than the current file position.

This problem can be demonstrated with gdb's bigcore testcase on the
sparc architecture.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05 14:37:20 +02:00
..
9p 9p: fix a potential acl leak 2017-05-14 13:32:54 +02:00
adfs
affs affs: fix remount failure when there are no options changed 2016-06-07 18:14:32 -07:00
afs
autofs4 autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL 2017-06-29 12:48:50 +02:00
befs
bfs
btrfs Btrfs: fix truncate down when no_holes feature is enabled 2017-07-05 14:37:18 +02:00
cachefiles
ceph fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
cifs CIFS: Improve readdir verbosity 2017-06-29 12:48:51 +02:00
coda
configfs configfs: Fix race between create_link and configfs_rmdir 2017-06-26 07:13:08 +02:00
cramfs
debugfs debugfs: Make automount point inodes permanently empty 2016-05-04 14:48:41 -07:00
devpts devpts: clean up interface to pty drivers 2016-08-16 09:30:49 +02:00
dlm dlm: free workqueues after the connections 2016-10-22 12:26:56 +02:00
ecryptfs ecryptfs: fix handling of directory opening 2016-09-15 08:27:47 +02:00
efivarfs
efs
exofs
exportfs
ext2 posix_acl: Clear SGID bit when setting file permissions 2016-10-31 04:13:58 -06:00
ext4 fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
f2fs fscrypt: avoid collisions when presenting long encrypted filenames 2017-05-25 14:30:11 +02:00
fat fat: fix using uninitialized fields of fat_inode/fsinfo_inode 2017-03-15 09:57:15 +08:00
freevxfs
fscache FS-Cache: Initialise stores_lock in netfs cookie 2017-06-17 06:39:37 +02:00
fuse fuse: add missing FR_FORCE 2017-03-12 06:37:28 +01:00
gfs2 gfs2: avoid uninitialized variable warning 2017-04-30 05:49:28 +02:00
hfs
hfsplus posix_acl: Clear SGID bit when setting file permissions 2016-10-31 04:13:58 -06:00
hostfs hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common() 2016-09-30 10:18:39 +02:00
hpfs hpfs: implement the show_options method 2016-06-01 12:15:54 -07:00
hugetlbfs mm: larger stack guard gap, between vmas 2017-06-26 07:13:11 +02:00
isofs isofs: Do not return EACCES for unknown filesystems 2016-10-28 03:01:34 -04:00
jbd2 jbd2: don't leak modified metadata buffers on an aborted journal 2017-03-12 06:37:26 +01:00
jffs2 posix_acl: Clear SGID bit when setting file permissions 2016-10-31 04:13:58 -06:00
jfs fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
kernfs kernfs: don't depend on d_find_any_alias() when generating notifications 2016-09-24 10:07:36 +02:00
lockd
logfs
minix
ncpfs
nfs NFSv4: fix a reference leak caused WARNING messages 2017-07-05 14:37:15 +02:00
nfs_common
nfsd fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
nilfs2 fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
nls
notify fanotify: fix list corruption in fanotify_get_response() 2016-09-30 10:18:37 +02:00
ntfs
ocfs2 fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
omfs
openpromfs
overlayfs ovl: fsync after copy-up 2016-11-10 16:36:34 +01:00
proc mm: larger stack guard gap, between vmas 2017-06-26 07:13:11 +02:00
pstore pstore/ram: Use memcpy_fromio() to save old buffer 2016-10-28 03:01:27 -04:00
qnx4
qnx6
quota
ramfs
reiserfs fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
romfs romfs: use different way to generate fsid for BLOCK or MTD 2017-06-17 06:39:38 +02:00
squashfs
sysfs sysfs: be careful of error returns from ops->show() 2017-04-12 12:38:33 +02:00
sysv
tracefs
ubifs ubifs: Fix journal replay wrt. xattr nodes 2017-01-26 08:23:48 +01:00
udf fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
ufs ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path 2017-06-14 13:16:24 +02:00
xfs Make __xfs_xattr_put_listen preperly report errors. 2017-06-14 13:16:27 +02:00
aio.c aio: mark AIO pseudo-fs noexec 2016-10-07 15:23:47 +02:00
anon_inodes.c
attr.c vfs: move permission checking into notify_change() for utimes(NULL) 2016-10-22 12:26:56 +02:00
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c coredump: Ensure proper size of sparse core files 2017-07-05 14:37:20 +02:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c fs/block_dev: always invalidate cleancache in invalidate_bdev() 2017-05-20 14:27:01 +02:00
buffer.c fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c coredump: Ensure proper size of sparse core files 2017-07-05 14:37:20 +02:00
dax.c
dcache.c mnt: Protect the mountpoint hashtable with mount_lock 2017-01-19 20:17:21 +01:00
dcookies.c
direct-io.c fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
drop_caches.c
eventfd.c
eventpoll.c
exec.c fs/exec.c: account for argv/envp pointers 2017-06-29 12:48:50 +02:00
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_pin.c
fs_struct.c
fs-writeback.c writeback, cgroup: fix use of the wrong bdi_writeback which mismatches the inode 2016-04-12 09:09:04 -07:00
inode.c vfs: fix deadlock in file_remove_privs() on overlayfs 2016-08-10 11:49:30 +02:00
internal.h
ioctl.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c locks: use file_inode() 2016-08-10 11:49:27 +02:00
Makefile
mbcache.c
mount.h mnt: Add a per mount namespace limit on the number of mounts 2017-04-30 05:49:28 +02:00
mpage.c fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
namei.c fs: Check for invalid i_uid in may_follow_link() 2016-09-15 08:27:49 +02:00
namespace.c mnt: Add a per mount namespace limit on the number of mounts 2017-04-30 05:49:28 +02:00
no-block.c
nsfs.c
open.c vfs: add vfs_select_inode() helper 2016-05-18 17:06:48 -07:00
pipe.c pipe: limit the per-user amount of pages allocated in pipes 2016-06-07 18:14:35 -07:00
pnode.c mnt: Add a per mount namespace limit on the number of mounts 2017-04-30 05:49:28 +02:00
pnode.h mnt: Add a per mount namespace limit on the number of mounts 2017-04-30 05:49:28 +02:00
posix_acl.c tmpfs: clear S_ISGID when setting posix ACLs 2017-01-26 08:23:47 +01:00
proc_namespace.c
read_write.c
readdir.c
select.c
seq_file.c fs/seq_file: fix out-of-bounds read 2016-09-07 08:32:43 +02:00
signalfd.c
splice.c vfs: fix uninitialized flags in splice_to_pipe() 2017-02-23 17:43:09 +01:00
stack.c
stat.c ufs: restore maintaining ->i_blocks 2017-06-14 13:16:24 +02:00
statfs.c
super.c fs/super.c: fix race between freeze_super() and thaw_super() 2016-10-28 03:01:32 -04:00
sync.c
timerfd.c timerfd: Protect the might cancel mechanism proper 2017-05-08 07:46:01 +02:00
userfaultfd.c
utimes.c vfs: move permission checking into notify_change() for utimes(NULL) 2016-10-22 12:26:56 +02:00
xattr.c fs/xattr.c: zero out memory copied to userspace in getxattr 2017-05-20 14:27:01 +02:00