Page MenuHomeFreeBSD

jack_gandi.net
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 9 2018, 9:29 AM (308 w, 5 h)

Recent Activity

Sep 16 2019

jack_gandi.net added a comment to D18930: Per-thread credentials.

Hello FreeBSD maintainers,

Sep 16 2019, 8:46 PM

Apr 8 2019

jack_gandi.net added a comment to D18930: Per-thread credentials.

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.

Apr 8 2019, 9:56 PM

Mar 13 2019

jack_gandi.net added inline comments to D18930: Per-thread credentials.
Mar 13 2019, 9:10 PM

Feb 27 2019

jack_gandi.net added a reviewer for D19388: Fix regression introduced in r344569: bapt.
Feb 27 2019, 1:35 PM
jack_gandi.net created D19388: Fix regression introduced in r344569.
Feb 27 2019, 1:32 PM

Feb 11 2019

jack_gandi.net added a comment to D18930: Per-thread credentials.
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 11 2019, 2:06 PM

Feb 8 2019

jack_gandi.net added a comment to D19098: Parallel zfs mounting.

Some updates:

Feb 8 2019, 10:09 AM

Feb 7 2019

jack_gandi.net updated the summary of D19098: Parallel zfs mounting.
Feb 7 2019, 10:28 AM
jack_gandi.net added a reviewer for D19098: Parallel zfs mounting: mav.
Feb 7 2019, 10:13 AM
jack_gandi.net created D19098: Parallel zfs mounting.
Feb 7 2019, 10:12 AM

Feb 4 2019

jack_gandi.net updated the diff for D18930: Per-thread credentials.

@mjg: reverted back to one reference per object. You're right, better safe than sorry.

Feb 4 2019, 10:00 AM

Feb 1 2019

jack_gandi.net updated the diff for D18930: Per-thread credentials.

The reference hold/free logic was wrong. now in the case where td_ucred==td_pucred only one reference is held.

Feb 1 2019, 10:01 AM

Jan 31 2019

jack_gandi.net updated the diff for D18930: Per-thread credentials.

@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 31 2019, 4:26 PM

Jan 30 2019

jack_gandi.net updated the diff for D18930: Per-thread credentials.

@mjg: moved copyout outside of PROC_LOCK for getgroups, getresuid and getresgid.

Jan 30 2019, 12:55 PM

Jan 28 2019

jack_gandi.net updated the diff for D18930: Per-thread credentials.

Moved the process to thread credential syncronization logic into thread_cow_update instead of everywhere scattered around the codebase.

Jan 28 2019, 4:25 PM
jack_gandi.net added inline comments to D18930: Per-thread credentials.
Jan 28 2019, 4:20 PM

Jan 25 2019

jack_gandi.net updated the diff for D18930: Per-thread credentials.

@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 25 2019, 4:54 PM

Jan 24 2019

jack_gandi.net added a comment to D18930: Per-thread credentials.

Is this change safe without holding the process lock? Historically, p_ucred hasn't been a stable pointer without it.

Jan 24 2019, 10:15 AM

Jan 23 2019

jack_gandi.net updated the summary of D18930: Per-thread credentials.
Jan 23 2019, 4:51 PM
jack_gandi.net created D18930: Per-thread credentials.
Jan 23 2019, 4:45 PM

Dec 10 2018

jack_gandi.net updated the diff for D18501: fix getfhat bug introduced by D18359.

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 10 2018, 5:00 PM
jack_gandi.net retitled D18501: fix getfhat bug introduced by D18359 from review D18359 introduced bug forgetfhat(2) with NULL path. to fix getfhat bug introduced by D18359.
Dec 10 2018, 3:41 PM
jack_gandi.net retitled D18501: fix getfhat bug introduced by D18359 from Summary: review https://reviews.freebsd.org/D18359 introduced bug for getfhat(2) with NULL path. to review D18359 introduced bug forgetfhat(2) with NULL path..
Dec 10 2018, 3:39 PM
jack_gandi.net created D18501: fix getfhat bug introduced by D18359.
Dec 10 2018, 3:34 PM

Dec 7 2018

jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Dec 7 2018, 12:29 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Dec 7 2018, 9:49 AM · manpages

Dec 5 2018

jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Dec 5 2018, 9:33 AM · manpages

Dec 4 2018

jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Dec 4 2018, 3:35 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Dec 4 2018, 3:31 PM · manpages

Dec 3 2018

jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.

No more locks, no more leaks as far as I can tell

Dec 3 2018, 9:34 AM · manpages

Nov 30 2018

jack_gandi.net added a comment to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
In D18359#391303, @kib 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 ?

Nov 30 2018, 3:55 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 30 2018, 3:04 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.

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.

Nov 30 2018, 3:00 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 30 2018, 2:53 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.

temporary pathc, I'm still looking into the lock recursion that @kib has mentionned.

Nov 30 2018, 1:36 PM · manpages
jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 30 2018, 10:34 AM · manpages
jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 30 2018, 10:06 AM · manpages
jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 30 2018, 10:03 AM · manpages
jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 30 2018, 9:45 AM · manpages

Nov 29 2018

jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 29 2018, 4:21 PM · manpages
jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 29 2018, 4:19 PM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.

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 29 2018, 4:18 PM · manpages

Nov 28 2018

jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 28 2018, 10:07 AM · manpages
jack_gandi.net added inline comments to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 28 2018, 10:04 AM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 28 2018, 10:00 AM · manpages
jack_gandi.net added a comment to D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.

Here's some more context to the diff. I wasn't aware of style(9), will check that before submitting in the future.

Nov 28 2018, 9:57 AM · manpages
jack_gandi.net updated the diff for D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 28 2018, 9:50 AM · manpages

Nov 27 2018

jack_gandi.net created D18359: getfhat, fhlink, fhlinkat, fhreadlink: new file handle system calls.
Nov 27 2018, 4:19 PM · manpages

Nov 14 2018

jack_gandi.net added a comment to D17917: d_off support for multiple filesystems.
In D17917#384287, @kib wrote:

Note the request for attributes/metadata for the change. I will commit after you provide the info.

Nov 14 2018, 2:04 PM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 14 2018, 2:01 PM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 14 2018, 11:29 AM
jack_gandi.net added a comment to D17917: d_off support for multiple filesystems.
In D17917#383965, @kib 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 14 2018, 10:48 AM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 14 2018, 10:44 AM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 14 2018, 10:42 AM

Nov 13 2018

jack_gandi.net added a comment to D17917: d_off support for multiple filesystems.
In D17917#383719, @kib wrote:

Also please add an implementation note to mention readdir plus NFS RPC response, as suggested by Rick.

Nov 13 2018, 9:03 AM

Nov 12 2018

jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 12 2018, 4:44 PM
jack_gandi.net added inline comments to D17917: d_off support for multiple filesystems.
Nov 12 2018, 2:44 PM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 12 2018, 10:27 AM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.

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 12 2018, 9:49 AM

Nov 9 2018

jack_gandi.net added inline comments to D17917: d_off support for multiple filesystems.
Nov 9 2018, 4:33 PM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.
Nov 9 2018, 3:53 PM
jack_gandi.net added a comment to D17917: d_off support for multiple filesystems.
In D17917#382778, @pfg wrote:

Maybe a sweep with opengrok is a good idea to see where we should be using this.

Nov 9 2018, 3:20 PM
jack_gandi.net updated the diff for D17917: d_off support for multiple filesystems.

overlooked a zfsctl_snapdir_readdir vfs call used for zfs snapshots.

Nov 9 2018, 10:59 AM
jack_gandi.net added inline comments to D17917: d_off support for multiple filesystems.
Nov 9 2018, 10:43 AM
jack_gandi.net added a comment to D17917: d_off support for multiple filesystems.

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.

Nov 9 2018, 10:11 AM
jack_gandi.net created D17917: d_off support for multiple filesystems.
Nov 9 2018, 9:55 AM