Hello FreeBSD maintainers,
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Sep 16 2019
Apr 8 2019
I've tried to justify the current implementation as best I can to see if it can get past the finish line instead of going for a credfd solution (which I don't think I'll have the will to design and implement).
For the credfd solution, I agree with the wins, although I think it would be expensive to prepare everything upfront, also that design doesn't solve the copy-on-write problem you mentioned.
Mar 13 2019
Feb 27 2019
Feb 11 2019
In D18930#406796, @mjg wrote:I don't have an opinion about the userspace API. It does seem a little bit fishy that there is no tight control from that end. I would expect a fully-privileged daemon to get create a credfd an allow certain uids/gids to be switched to. Then it can drop privs. But again, I did not think this through.
Feb 8 2019
Feb 7 2019
Feb 4 2019
@mjg: reverted back to one reference per object. You're right, better safe than sorry.
Feb 1 2019
The reference hold/free logic was wrong. now in the case where td_ucred==td_pucred only one reference is held.
Jan 31 2019
@mjg: good call, this revision is likely the best regarding performance, and code complexity. As for future-proofing, it's obvious that process credentials will always be necessary for backwards compatibility so caching them entirely in each thread is a good idea.
Jan 30 2019
@mjg: moved copyout outside of PROC_LOCK for getgroups, getresuid and getresgid.
Jan 28 2019
Moved the process to thread credential syncronization logic into thread_cow_update instead of everywhere scattered around the codebase.
Jan 25 2019
@rwatson: The patch has been updated to take into account the other parts of credentials: jail, MAC, audit and flags are written to thread credential in order for them to always be in sync with the process credentials.
Jan 24 2019
Is this change safe without holding the process lock? Historically, p_ucred hasn't been a stable pointer without it.
Jan 23 2019
Dec 10 2018
The dot special behaviour was because our application is currently using getfhat with a NULL path. We'll fix this in the application rather than in kernel code. I've rolled back to a behaviour similar to openat, also amended the manpage.
Dec 7 2018
Dec 5 2018
Dec 4 2018
Dec 3 2018
No more locks, no more leaks as far as I can tell
Nov 30 2018
In D18359#391303, @kib wrote:In D18359#391289, @jack_gandi.net wrote:I was able to reproduce the lock recursion in the case where the source fhp points to the same object as the destination link. It turns ou the link(2) doesn't lock the source node which seems acceptable. So I changed fhlinkat_kern to only LK_SHARED on the source node, therefore the kern_linkat_vp doesn't need the bool locked anymore because all the callers have the same input locking state.
LK_SHARED is still locking the vnode, although in the shared mode. So from the brief look at the updated patch, you are leaking the vnode locks.
Do you run the tests with WITNESS + DEBUG_VFS_LOCKS kernel options ?
I was able to reproduce the lock recursion in the case where the source fhp points to the same object as the destination link. It turns ou the link(2) doesn't lock the source node which seems acceptable. So I changed fhlinkat_kern to only LK_SHARED on the source node, therefore the kern_linkat_vp doesn't need the bool locked anymore because all the callers have the same input locking state.
temporary pathc, I'm still looking into the lock recursion that @kib has mentionned.
Nov 29 2018
In this diff there is no more code duplication. also I forgot to include the two new manpages in the previous versions (fhlink.2 and fhreadlink.2).
Nov 28 2018
Here's some more context to the diff. I wasn't aware of style(9), will check that before submitting in the future.
Nov 27 2018
Nov 14 2018
In D17917#384287, @kib wrote:Note the request for attributes/metadata for the change. I will commit after you provide the info.
In D17917#383965, @kib wrote:In D17917#383881, @jack_gandi.net wrote:In D17917#383719, @kib wrote:Also please add an implementation note to mention readdir plus NFS RPC response, as suggested by Rick.
I'm not sure what you mean by this, should I add a new section to the manpage?
Yes, this is most suitable for 'IMPLEMENTATION NOTES section.
Nov 13 2018
In D17917#383719, @kib wrote:Also please add an implementation note to mention readdir plus NFS RPC response, as suggested by Rick.
Nov 12 2018
Added to the getdirentries.2 man page. Also make udf_readdir more consistent as requested. Apparently udf is used for DVDs and optical disks so it shouldn't matter anyway.
Nov 9 2018
In D17917#382778, @pfg wrote:Maybe a sweep with opengrok is a good idea to see where we should be using this.
overlooked a zfsctl_snapdir_readdir vfs call used for zfs snapshots.
this is a rough check I used for testing. Basically we want the d_off value to be the lseek value *after* reading a given entry. To check for lseek we must only iterate over getdirentries one entry at a time, otherwise the lseek offset will be too far off.