This is exactly right and is the intention of the call.
The fh_t is indeed a type of capability. fh_t, properly protected, could
be passed into user space and validated by the file system when
presented back to the file system.
There is state here, clearly. I feel ok about that because we allow
servers to forget that they handed out these fh_ts if they feel like it;
there is no guaranteed lifetime in the current proposal. This allows
servers to come and go without needing to persistently store these.
Likewise, clients can forget them with no real penalty.
This approach is ok because of the use case. Because we expect the fh_t
to be used relatively soon after its creation, servers will not need to
hold onto these long before the openfh() is performed and we're back
into a normal "everyone has an valid fd" use case.
> And because it needs kernel support you
Well, a FD has some additional state associated with it (position,
etc.), but yes there are definitely similarities to dup().
I'm not sure what a properly protected fh_t couldn't be passed back into
user space and handed around, but I'm not a security expert. What am I
missing?
The documentation of the calls is complicated by the way POSIX calls are
described. We need to have a second document describing use cases also
available, so that we can avoid misunderstandings as best we can, get
straight to the real issues. Sorry that document wasn't available.
I think I've addressed the statefulness of the API above?
Thanks.
Rob
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html