Re: [PATCH] Handle i_size > s_maxbytes correctly

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mark Fasheh <mark.fasheh@...>
Cc: Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Monday, January 7, 2008 - 12:52 pm

On Sat 22-12-07 12:03:10, Mark Fasheh wrote:
  Actually there are two problems. The first one is calls from userspace
beyond s_maxbytes. Those can be (and are) easily handled. But then there
are places inside VFS which compute things like maximal page index in the
file (and they compute it regardless the actual place where we access the
file). These computations can overflow even if the access is perfectly
within s_maxbytes and cause nasty things. That's why I've introduced that
i_size_read_trunc() function and we really need to fix them somehow for
OCFS2 or we have to make sure that these functions are never called on
files larger than s_maxbytes. I'll try to come up with more obvious
alternative to i_size_read_trunc() and if I fail I'll investigate how hard
it would be to handle the problems inside OCFS2.

									Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Handle i_size &gt; s_maxbytes correctly, Jan Kara, (Thu Dec 20, 1:51 pm)
Re: [PATCH] Handle i_size &gt; s_maxbytes correctly, Andrew Morton, (Sat Dec 22, 4:12 am)
Re: [PATCH] Handle i_size &gt; s_maxbytes correctly, Mark Fasheh, (Sat Dec 22, 4:03 pm)
Re: [PATCH] Handle i_size > s_maxbytes correctly, Jan Kara, (Mon Jan 7, 12:52 pm)
Re: [PATCH] Handle i_size &gt; s_maxbytes correctly, Mark Fasheh, (Thu Dec 20, 1:59 pm)