Re: [RFC PATCH 1/2] VFS: Kill use of O_LARGEFILE inside the kernel

2015-09-22 Thread Dave Chinner
On Tue, Sep 22, 2015 at 05:12:42PM +0100, David Howells wrote: > Theodore Ts'o 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,

Re: [RFC PATCH 1/2] VFS: Kill use of O_LARGEFILE inside the kernel

2015-09-22 Thread Theodore Ts'o
On Tue, Sep 22, 2015 at 05:12:42PM +0100, David Howells wrote: > > Further, path-based truncate() makes no checks based on file-largeness, unlike > ftruncate(). Right, but truncate in general is used to make files *smaller* so I'm having trouble thinking of a scenario where a largefile-oblivious

Re: [RFC PATCH 1/2] VFS: Kill use of O_LARGEFILE inside the kernel

2015-09-22 Thread David Howells
Theodore Ts'o 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

Re: [RFC PATCH 1/2] VFS: Kill use of O_LARGEFILE inside the kernel

2015-09-22 Thread Theodore Ts'o
On Tue, Sep 22, 2015 at 04:24:50PM +0100, David Howells wrote: > > (4) fs/open.c: Length check in ftruncate(). > > (5) fs/open.c: Length check in generic_file_open(). > > All but the first two are just making length checks that are waived > unconditionally on a 64-bit system. Just skip the