[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o9bi6632.fsf@notabene.neil.brown.name>
Date: Thu, 25 Oct 2018 14:46:57 +1100
From: NeilBrown <neilb@...e.com>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: Andy Lutomirski <luto@...nel.org>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Peter Zijlstra <peterz@...radead.org>,
Dmitry Safonov <dsafonov@...tuozzo.com>,
"H. Peter Anvin" <hpa@...or.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
Brian Gerst <brgerst@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-tip-commits@...r.kernel.org, jsimmons@...radead.org
Subject: Re: in_compat_syscall() returns from kernel thread for X86_32.
On Wed, Oct 24 2018, Theodore Y. Ts'o wrote:
> On Wed, Oct 24, 2018 at 12:47:57PM +1100, NeilBrown wrote:
>>
>> I doubt it was copied - more likely independent evolution.
>> But on reflection, I see that it is probably reasonable that it
>> shouldn't be used this way - or at all in this context.
>> I'll try to understand what the issues really are and see if I can
>> find a solution that doesn't depend on this interface.
>> Thanks for your help.
>
> At least for ext4, the primary problem is that we want to use a 64-bit
> telldir/seekdir cookie if all 64-bits will make it to user space, and
> a 32-bit telldir cookie if only 32 bits will make it userspace. This
> impacts NFS as well because if there are people who are still using
> NFSv2, which has 32-bit directory offsets, we need to constrain the
> telldir/seekdir cookies we give to NFS to be a 32 has as opposed to a
> 64-bit hash.
NFSd uses FMODE_32BITHASH or FMODE64BITHASH to allow ext4 to do the
right thing. FMODE_32BITHASH is set for NFSv2 only.
Maybe sys_getdents needs to set FMODE_32BITHASH, and sys_getdent64 needs
to set FMODE_64BITHASH - or something like that.
For lustre it is a bit more complex. The internal "inode number" is 128
bits and we (sort of) hash it to 32 or 64 bits. cp_compat_stat() just
says -EOVERFLOW if we give a 64 bit number when 32 are expected, and
there is no flag to say "this is a 32-bit 'stat' request".
But I need to dig into exactly what that "sort-of" means - maybe there
is an answer in there.
NeilBrown
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists