* [PATCH 2.6.12-rc6-git6] Fix large core dumps with a 32-bit off_t
@ 2005-06-13 20:13 Daniel Jacobowitz
0 siblings, 0 replies; only message in thread
From: Daniel Jacobowitz @ 2005-06-13 20:13 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
The ELF core dump code has one use of off_t when writing out segments. Some
of the segments may be passed the 2GB limit of an off_t, even on a 32-bit
system, so it's important to use loff_t instead. This fixes a corrupted
core dump in the bigcore test in GDB's testsuite.
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Index: linux-2.6.11/fs/binfmt_elf.c
===================================================================
--- linux-2.6.11.orig/fs/binfmt_elf.c 2005-06-09 16:38:17.000000000 -0400
+++ linux-2.6.11/fs/binfmt_elf.c 2005-06-10 00:10:52.000000000 -0400
@@ -1125,7 +1125,7 @@ static int dump_write(struct file *file,
return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
}
-static int dump_seek(struct file *file, off_t off)
+static int dump_seek(struct file *file, loff_t off)
{
if (file->f_op->llseek) {
if (file->f_op->llseek(file, off, 0) != off)
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-13 20:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-13 20:13 [PATCH 2.6.12-rc6-git6] Fix large core dumps with a 32-bit off_t Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox