From: "bfields@fieldses.org" <bfields@fieldses.org>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"aglo@umich.edu" <aglo@umich.edu>,
"louis.devandiere@atos.net" <louis.devandiere@atos.net>
Subject: Re: Maximum Number of ACL on NFSv4
Date: Wed, 28 Aug 2019 17:44:31 -0400 [thread overview]
Message-ID: <20190828214431.GB32010@fieldses.org> (raw)
In-Reply-To: <a55b35b61987255d51c73d91c3e15fb99621250b.camel@hammerspace.com>
On Wed, Aug 28, 2019 at 09:26:20PM +0000, Trond Myklebust wrote:
> On Wed, 2019-08-28 at 17:06 -0400, bfields@fieldses.org wrote:
> > On Wed, Aug 28, 2019 at 08:25:16PM +0000, Trond Myklebust wrote:
> > > Umm... Don't forget that NFSv4 ACL aces are typically much larger
> > > than
> > > POSIX ACL aces because the user/group names are encoded as strings,
> > > not
> > > binary uids and gids.
> > >
> > > IOW: The size of the RPC message is likely to be a lot larger than
> > > the
> > > resulting POSIX ACL...
> >
> > Actually this limit is post-idmapping, but, yes, before NFSv4->Posix
> > mapping (complicated in itself), which is why I talked about having
> > to
> > estimate.
> >
> > More interested to hear what you think about whether we need a limit
> > at
> > all. Do we have any ideas how big is too big a number to pass to
> > kmalloc? Or is it OK to just let anything through and let kmalloc
> > fail?
> >
>
> A NFSv4.x client is always required to respect the max request size as
> negotiated during CREATE_SESSION, so there is an upper limit right
> there. On Linux, the client will never try to negotiate a limit greater
> than 1MB.
The limit's actually a sanity check on the number of ACEs. Since that's
what we're about to use in the kmalloc; in the ACL xdr decoding:
if (nace > NFS4_ACL_MAX)
return nfserr_fbig;
*acl = svcxdr_tmpalloc(argp, nfs4_acl_bytes(nace));
Maybe the simplest thing is only to reject an nace value that'd be
impossible given the size of the rpc call.
--b.
next prev parent reply other threads:[~2019-08-28 21:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AM5PR0202MB25641230B578F7D080A67BA4E7A40@AM5PR0202MB2564.eurprd02.prod.outlook.com>
2019-08-23 22:31 ` Maximum Number of ACL on NFSv4 de Vandiere, Louis
2019-08-26 13:44 ` Goetz, Patrick G
2019-08-26 14:53 ` de Vandiere, Louis
2019-08-26 16:46 ` Niels de Vos
2019-08-26 17:25 ` de Vandiere, Louis
2019-08-26 19:30 ` Olga Kornievskaia
2019-08-26 23:28 ` de Vandiere, Louis
2019-08-28 18:05 ` J. Bruce Fields
2019-08-28 19:09 ` Olga Kornievskaia
2019-08-28 19:29 ` J. Bruce Fields
2019-08-28 20:25 ` Trond Myklebust
2019-08-28 21:06 ` bfields
2019-08-28 21:26 ` Trond Myklebust
2019-08-28 21:44 ` bfields [this message]
2019-08-29 1:13 ` bfields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190828214431.GB32010@fieldses.org \
--to=bfields@fieldses.org \
--cc=aglo@umich.edu \
--cc=linux-nfs@vger.kernel.org \
--cc=louis.devandiere@atos.net \
--cc=trondmy@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox