aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/coredump.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-14 10:57:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-14 10:57:40 -0700
commit0eead9ab41da33644ae2c97c57ad03da636a0422 (patch)
tree757516bc7caa70a10101264edc3eac7d44c11ce8 /include/linux/coredump.h
parentMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx (diff)
downloadlinux-dev-0eead9ab41da33644ae2c97c57ad03da636a0422.tar.xz
linux-dev-0eead9ab41da33644ae2c97c57ad03da636a0422.zip
Don't dump task struct in a.out core-dumps
akiphie points out that a.out core-dumps have that odd task struct dumping that was never used and was never really a good idea (it goes back into the mists of history, probably the original core-dumping code). Just remove it. Also do the access_ok() check on dump_write(). It probably doesn't matter (since normal filesystems all seem to do it anyway), but he points out that it's normally done by the VFS layer, so ... [ I suspect that we should possibly do "vfs_write()" instead of calling ->write directly. That also does the whole fsnotify and write statistics thing, which may or may not be a good idea. ] And just to be anal, do this all for the x86-64 32-bit a.out emulation code too, even though it's not enabled (and won't currently even compile) Reported-by: akiphie <akiphie@lavabit.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/coredump.h')
-rw-r--r--include/linux/coredump.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 8ba66a9d9022..59579cfee6a0 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -11,7 +11,7 @@
*/
static inline int dump_write(struct file *file, const void *addr, int nr)
{
- return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
+ return access_ok(VERIFY_READ, addr, nr) && file->f_op->write(file, addr, nr, &file->f_pos) == nr;
}
static inline int dump_seek(struct file *file, loff_t off)