Re: file offset corruption on 32-bit machines?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pavel Machek <pavel@...>
Cc: Jan Kara <jack@...>, Bodo Eggert <7eggert@...>, Diego Calleja <diegocg@...>, Jiri Kosina <jkosina@...>, Michal Hocko <mhocko@...>, Meelis Roos <mroos@...>, Linux Kernel list <linux-kernel@...>, <linux-fsdevel@...>
Date: Tuesday, April 15, 2008 - 2:24 pm

On Tue, Apr 15, 2008 at 07:34:30PM +0200, Pavel Machek wrote:

I only see an application bug so far.


If you can't do it on demand (which I can't see any way to do) then I
don't think malware can take advantage of it.


True, but even without this behaviour doing seeks and read/writes from
multiple threads without locking will already show plenty of problems
even if you somehow manage to hit this issue, and not only that you have
to have threads writing to different 4GB aligned chunks of the file to
cause a problem, since otherwise they would all be setting the top bits
the same.  I would hope anyone doing multithreaded work on a file that
big would like to avoid the locking issue by using pread and pwrite
instead in which case there is no problem either.


Does it say anything about what happens if you try to seek from two
places at once?


The parts I can find for posix don't say one way or the other.

-- 
Len Sorensen
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: file offset corruption on 32-bit machines?, Bodo Eggert, (Fri Apr 11, 8:24 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Fri Apr 11, 9:55 am)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 12:20 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 12:22 pm)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 12:53 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 1:06 pm)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 3:03 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 3:29 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 4:57 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 11:32 am)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 1:34 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 2:24 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 3:12 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 3:49 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Tue Apr 15, 4:06 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Tue Apr 15, 4:29 pm)
Re: file offset corruption on 32-bit machines?, Bryan Henderson, (Tue Apr 15, 6:11 pm)
Re: file offset corruption on 32-bit machines?, Jamie Lokier, (Wed Apr 16, 5:40 am)
Re: file offset corruption on 32-bit machines?, Peter Zijlstra, (Tue Apr 15, 4:28 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Wed Apr 16, 4:15 am)
Re: file offset corruption on 32-bit machines?, Alan Cox, (Wed Apr 16, 6:54 am)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Wed Apr 16, 9:57 am)
Re: file offset corruption on 32-bit machines?, Peter Zijlstra, (Wed Apr 16, 4:20 am)
Re: file offset corruption on 32-bit machines?, Jan Kara, (Mon Apr 14, 3:42 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Mon Apr 14, 3:45 pm)
Re: file offset corruption on 32-bit machines?, Alan Cox, (Mon Apr 14, 12:54 pm)
Re: file offset corruption on 32-bit machines?, Alexey Dobriyan, (Mon Apr 14, 2:34 pm)
Re: file offset corruption on 32-bit machines?, Bryan Henderson, (Fri Apr 11, 12:59 pm)
Re: file offset corruption on 32-bit machines?, Lennart Sorensen, (Fri Apr 11, 1:15 pm)
Re: file offset corruption on 32-bit machines?, Pavel Machek, (Sat Apr 12, 4:48 am)
Re: file offset corruption on 32-bit machines?, Bryan Henderson, (Fri Apr 11, 5:29 pm)