Re: [PATCH] fcntl: Add 32bit filesystem mode

2020-04-20 Thread Theodore Y. Ts'o
On Mon, Apr 20, 2020 at 04:29:32PM +0100, Peter Maydell wrote: > On Mon, 20 Apr 2020 at 16:24, Eric Blake wrote: > > It will be interesting to find how much code (wrongly) assumes it can > > use a blind assignment of fcntl(fd, F_SETFD, 1) and thereby accidentally > > wipes out other existing flags

Re: [PATCH] fcntl: Add 32bit filesystem mode

2020-04-20 Thread Theodore Y. Ts'o
On Tue, Mar 31, 2020 at 03:35:36PM +0200, Linus Walleij wrote: > It was brought to my attention that this bug from 2018 was > still unresolved: 32 bit emulators like QEMU were given > 64 bit hashes when running 32 bit emulation on 64 bit systems. > > This adds a fcntl() operation to set the underl

Re: [PATCH] ext4: Give 32bit personalities 32bit hashes

2020-03-24 Thread Theodore Y. Ts'o
On Tue, Mar 24, 2020 at 09:29:58AM +, Peter Maydell wrote: > > On the contrary, that would be a much better interface for QEMU. > We always know when we're doing an open-syscall on behalf > of the guest, and it would be trivial to make the fcntl() call then. > That would ensure that we don't a

Re: [PATCH] ext4: Give 32bit personalities 32bit hashes

2020-03-23 Thread Theodore Y. Ts'o
On Thu, Mar 19, 2020 at 11:23:33PM +0100, Linus Walleij wrote: > OK I guess we can at least take this opportunity to add > some kerneldoc to the include file. > > > As a concrete example, should "give me 32-bit semantics > > via PER_LINUX32" mean "mmap should always return addresses > > within 4GB

Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation

2018-12-28 Thread Theodore Y. Ts'o
On Sat, Dec 29, 2018 at 03:37:21AM +0100, Dominique Martinet wrote: > > Are there going to be cases where a process or a thread will sometimes > > want the 64-bit interface, and sometimes want the 32-bit interface? > > Or is it always going to be one or the other? I wonder if we could > > simply a

Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation

2018-12-28 Thread Theodore Y. Ts'o
On Fri, Dec 28, 2018 at 11:18:18AM +, Peter Maydell wrote: > In general inodes and offsets start from 0 and work up -- > so almost all of the time they don't actually overflow. > The problem with ext4 directory hash "offsets" is that they > overflow all the time and immediately, so instead of "