| To: | David Howells <dhowells@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [RFC PATCH 1/2] VFS: Kill use of O_LARGEFILE inside the kernel |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Wed, 23 Sep 2015 07:45:07 +1000 |
| Cc: | Theodore Ts'o <tytso@xxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1458.1442938362@xxxxxxxxxxxxxxxxxxxxxx> |
| References: | <20150922155104.GA2296@xxxxxxxxx> <20150922152450.32539.55285.stgit@xxxxxxxxxxxxxxxxxxxxxx> <1458.1442938362@xxxxxxxxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Tue, Sep 22, 2015 at 05:12:42PM +0100, David Howells wrote: > Theodore Ts'o <tytso@xxxxxxx> wrote: > > > So what this means is that on 32-bit systems, if we have a userspace > > program which isn't using the Largefile-enabled, and it opens a file > > which is larger than can be addressed with a 32-bit off_t, it can get > > surprised and possibly cause data loss. > > Good point. I was initially thinking that 32-bit userspace on a 64-bit system > would have O_LARGEFILE automatically enabled - but I guess it'll trap through > the compat entry points which avoid that. > > That said, fanotify and xfs_open_by_handle() will both automatically set > O_LARGEFILE irrespectively of the 32-bitness of the original caller. Any binaries that use xfs_open_by_handle() and then don't support greater than 32bit file offsets are simply broken. No ifs or buts - if you are using low level XFS specific file access ioctls, you need to build binaries that support 64 bit offsets. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: xfstests, bad generic tests 009 and 308, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH] xfs_io: Implement inodes64 command, Dave Chinner |
| Previous by Thread: | Re: [RFC PATCH 1/2] VFS: Kill use of O_LARGEFILE inside the kernel, Theodore Ts'o |
| Next by Thread: | [PATCH] mm/page_alloc: Favor kthread and dying threads over normal threads, Tetsuo Handa |
| Indexes: | [Date] [Thread] [Top] [All Lists] |