Page MenuHomeFreeBSD

jamie (James Gritton)
User

Projects

User Details

User Since
Aug 3 2014, 10:29 PM (365 w, 3 d)

Recent Activity

Tue, Jul 27

jamie accepted D31225: vmm: Destroy associated VM objects when a jail is destroyed.

I'm not thrilled at the redundant call to vfs_flagopt(), which shouldn't be necessary because kern_jail_set has already looked for allow.novmm and set the permission bit accordingly. But by the time vmmdev_prison_set() is called, the old value of the permission bit is forgotten. So you're left with

Tue, Jul 27, 11:10 PM

Jun 24 2021

jamie committed R10:75befde07bdf: jail: Don't allow substitution of valueless jail parameters. (authored by jamie).
jail: Don't allow substitution of valueless jail parameters.
Jun 24 2021, 5:55 PM
jamie committed R10:ade910f43b70: jail: Don't allow substitution of valueless jail parameters. (authored by jamie).
jail: Don't allow substitution of valueless jail parameters.
Jun 24 2021, 5:54 PM
jamie committed R10:6e2623c012c3: jail: Don't allow substitution of valueless jail parameters. (authored by jamie).
jail: Don't allow substitution of valueless jail parameters.
Jun 24 2021, 5:52 PM

Jun 18 2021

jamie committed R10:5bf6dca2c6db: jail: Don't allow substitution of valueless jail parameters. (authored by jamie).
jail: Don't allow substitution of valueless jail parameters.
Jun 18 2021, 4:48 PM

Apr 12 2021

jamie added inline comments to D29659: jail: convert several functions from int to bool.
Apr 12 2021, 4:13 PM · Jails
jamie added inline comments to D29659: jail: convert several functions from int to bool.
Apr 12 2021, 2:45 AM · Jails

Apr 11 2021

jamie added inline comments to D29659: jail: convert several functions from int to bool.
Apr 11 2021, 5:39 PM · Jails

Apr 9 2021

jamie added inline comments to D29659: jail: convert several functions from int to bool.
Apr 9 2021, 7:49 PM · Jails
jamie committed R10:73b04801b316: MFC jail: fix jail(8) synposis and usage message to match reality. (authored by jamie).
MFC jail: fix jail(8) synposis and usage message to match reality.
Apr 9 2021, 3:28 AM
jamie committed R10:bdb392c1d354: MFC jail: fix jail(8) synposis and usage message to match reality. (authored by jamie).
MFC jail: fix jail(8) synposis and usage message to match reality.
Apr 9 2021, 3:26 AM
jamie committed R10:6186592c106b: MFC jail: fix jail(8) synposis and usage message to match reality. (authored by jamie).
MFC jail: fix jail(8) synposis and usage message to match reality.
Apr 9 2021, 3:25 AM

Apr 8 2021

jamie added a comment to D29659: jail: convert several functions from int to bool.

there are other candidates that return (0) or a single error that is always the same, but here we would need modifying the call-site :

  • prison_check_af() 0/EAFNOSUPPORT
  • prison_canseemount() 0/ENOENT
  • prison_check() 0/ESRCH
Apr 8 2021, 10:57 PM · Jails
jamie added a comment to D29659: jail: convert several functions from int to bool.

Yeah, I'd been meaning to get around to that ;-).

Apr 8 2021, 8:43 PM · Jails

Apr 4 2021

jamie committed R10:8c1d956ffa03: jail: fix jail(8) synposis and usage message to match reality. (authored by jamie).
jail: fix jail(8) synposis and usage message to match reality.
Apr 4 2021, 5:53 PM

Mar 14 2021

jamie added a comment to D29255: make shell started by "jexec -l [-U user] jail" a login shell.

This would work well with jexec -l, which is already somewhat like su -l but misses the parts you mention. In fact, I would recommend making clean (-l) the deciding factor instead of pwd (-u/U). And I don't see a reason why the same directory change shouldn't be done regardless of whether it's for a command or a shell.

Mar 14 2021, 5:04 PM

Mar 12 2021

jamie committed R10:d2bbfc375487: MFC jail: Don't allow jails under dying parents (authored by jamie).
MFC jail: Don't allow jails under dying parents
Mar 12 2021, 6:50 PM
jamie committed R10:246339530348: MFC jail: Add PD_KILL to remove a prison in prison_deref(). (authored by jamie).
MFC jail: Add PD_KILL to remove a prison in prison_deref().
Mar 12 2021, 6:49 PM
jamie added a reverting change for R10:811e27fa3c44: jail: Add PD_KILL to remove a prison in prison_deref().: R10:246339530348: MFC jail: Add PD_KILL to remove a prison in prison_deref()..
Mar 12 2021, 6:49 PM
jamie added a reverting change for D28473: Add PD_KILL option to prison_deref(): R10:246339530348: MFC jail: Add PD_KILL to remove a prison in prison_deref()..
Mar 12 2021, 6:49 PM
jamie committed R10:2bfecbef9a57: MFC jail: Add pr_state to struct prison (authored by jamie).
MFC jail: Add pr_state to struct prison
Mar 12 2021, 6:47 PM
jamie committed R10:ad259c473dc6: MFC jail: Change the locking around pr_ref and pr_uref (authored by jamie).
MFC jail: Change the locking around pr_ref and pr_uref
Mar 12 2021, 6:32 PM
jamie committed R10:fe6b360a6293: MFC jail: Improve locking when removing prisons (authored by jamie).
MFC jail: Improve locking when removing prisons
Mar 12 2021, 6:16 PM

Mar 4 2021

jamie accepted D29008: jail(8): reset to root cpuset before attaching to run commands.

Looks good - nothing to add.

Mar 4 2021, 6:39 PM

Feb 27 2021

jamie added a comment to D28952: jail: allow root to implicitly widen its cpuset to attach.

This is still a necessary change, it's just not the only one we need; I suspect both jail(8) and jexec(8) should try to switch to their root's id before running commands in a jail, so that administratively spawned stuff ends up with the jail's full mask.

Feb 27 2021, 5:42 PM
jamie added a comment to D28952: jail: allow root to implicitly widen its cpuset to attach.

I suspect both jail(8) and jexec(8) should try to switch to their root's id before running commands in a jail, so that administratively spawned stuff ends up with the jail's full mask.

(edit) e.g., https://people.freebsd.org/~kevans//jail-cpuset.diff which accomplishes this for jail(8) on start/stop.

Feb 27 2021, 5:36 PM
jamie accepted D28952: jail: allow root to implicitly widen its cpuset to attach.
Feb 27 2021, 5:45 AM
jamie added a comment to D28952: jail: allow root to implicitly widen its cpuset to attach.

But how about this: first at least try using the intersection of the current and jail sets (whether or not currently jailed), and only as a EDEADLK fallback punt to just using the jailed set.

Yeah, I think that makes sense -- we're talking about EDEADLK fallback if the priv is also set, so that it naturally gets cpuset down if it can?

Feb 27 2021, 12:15 AM

Feb 26 2021

jamie added a comment to D28952: jail: allow root to implicitly widen its cpuset to attach.

This might be a reason to keep PRIV_JAIL_CPUSET, and have it generally be available to virtual as well as real root.

Feb 26 2021, 11:18 PM
jamie added a comment to D28952: jail: allow root to implicitly widen its cpuset to attach.

how does this, or the current approach apply to jails in jails (which are under a specific CPU set?

Feb 26 2021, 11:12 PM
jamie added a comment to D28952: jail: allow root to implicitly widen its cpuset to attach.

Might PRIV_SCHED_CPUSET be sufficient for this? If a process has the ability to explicitly expand the current cpu list, it makes sense for it to be able to implicitly do so when attaching to a jail.

Feb 26 2021, 10:51 PM
jamie added a comment to D24570: Add support for jail.d.

Would it make sense to be able to override the path (BTW: /etc/jail.conf.d would be my preference), in the sense of having it as a variable in /etc/defaults/rc.conf (would this help in the netboot case)?
Would it make sense to make this a list,, so that I could do e.g. jail_conf_dir="/etc/jail.conf.d /usr/local/etc/jail.conf.d"?

Feb 26 2021, 6:24 PM
jamie added a comment to D28150: jail: Don't allow resurrection of dead jails.

So, I'm going to ask a stupid question here; what all *actually* breaks if we end up with duplicate jids?

Feb 26 2021, 4:51 AM
jamie committed R10:589e4c1df4a6: jail: Add safety around prison_deref() flags. (authored by jamie).
jail: Add safety around prison_deref() flags.
Feb 26 2021, 4:13 AM
jamie committed R10:108a9384e9e9: jail: Fix locking on an early jail_set error. (authored by jamie).
jail: Fix locking on an early jail_set error.
Feb 26 2021, 3:54 AM
jamie updated the diff for D28150: jail: Don't allow resurrection of dead jails.

All previous work has been committed now (not without hiccups). This is the final-ish patch that only handles the main intent of the project.

Feb 26 2021, 3:49 AM

Feb 25 2021

jamie committed R10:c861373bdff9: jail: re-commit 811e27fa3c44 with fixes (authored by jamie).
jail: re-commit 811e27fa3c44 with fixes
Feb 25 2021, 5:55 AM
jamie added a comment to D28473: Add PD_KILL option to prison_deref().

Sorry I took so long - I confused your note that it should be reverted with a note that it *had been* reverted.

Feb 25 2021, 5:14 AM
jamie added a reverting change for R10:811e27fa3c44: jail: Add PD_KILL to remove a prison in prison_deref().: R10:ddfffb41a22d: jail: back out 811e27fa3c44 until it doesn't break Jenkins.
Feb 25 2021, 5:13 AM
jamie committed R10:ddfffb41a22d: jail: back out 811e27fa3c44 until it doesn't break Jenkins (authored by jamie).
jail: back out 811e27fa3c44 until it doesn't break Jenkins
Feb 25 2021, 5:13 AM
jamie added a reverting change for D28473: Add PD_KILL option to prison_deref(): R10:ddfffb41a22d: jail: back out 811e27fa3c44 until it doesn't break Jenkins.
Feb 25 2021, 5:13 AM

Feb 23 2021

jamie committed R10:0a2a96f35a4c: jail: Don't allow jails under dying parents (authored by jamie).
jail: Don't allow jails under dying parents
Feb 23 2021, 1:05 AM
jamie closed D28515: Don't allow jail "accidental" resurrection of dead jails..
Feb 23 2021, 1:05 AM

Feb 22 2021

jamie committed R10:701d6b50ae7b: jail: Fix a LOR introduced in 1158508a8086 (authored by jamie).
jail: Fix a LOR introduced in 1158508a8086
Feb 22 2021, 11:55 PM
jamie closed D28473: Add PD_KILL option to prison_deref().
Feb 22 2021, 8:28 PM
jamie committed R10:811e27fa3c44: jail: Add PD_KILL to remove a prison in prison_deref(). (authored by jamie).
jail: Add PD_KILL to remove a prison in prison_deref().
Feb 22 2021, 8:28 PM
jamie committed R10:570121808a76: MFC jail: Change both root and working directories in jail_attach(2) (authored by jamie).
MFC jail: Change both root and working directories in jail_attach(2)
Feb 22 2021, 7:08 PM
jamie committed R10:ca9ab8ea1774: MFC jail: Change both root and working directories in jail_attach(2) (authored by jamie).
MFC jail: Change both root and working directories in jail_attach(2)
Feb 22 2021, 7:03 PM
jamie committed R10:f3f042d850ba: MFS jail: Change both root and working directories in jail_attach(2) (authored by jamie).
MFS jail: Change both root and working directories in jail_attach(2)
Feb 22 2021, 6:26 PM
jamie committed R10:5dbb407145c8: MFC jail: Change both root and working directories in jail_attach(2) (authored by jamie).
MFC jail: Change both root and working directories in jail_attach(2)
Feb 22 2021, 5:52 AM

Feb 21 2021

jamie closed D27876: jail: Add pr_state to struct prison.
Feb 21 2021, 9:27 PM
jamie committed R10:1158508a8086: jail: Add pr_state to struct prison (authored by jamie).
jail: Add pr_state to struct prison
Feb 21 2021, 9:26 PM
jamie committed R10:f7496dcab036: jail: Change the locking around pr_ref and pr_uref (authored by jamie).
jail: Change the locking around pr_ref and pr_uref
Feb 21 2021, 6:57 PM
jamie closed D28419: Require allprison_lock and prison mutex when to free last prison reference.
Feb 21 2021, 6:57 PM

Feb 20 2021

jamie committed R10:6e1d1bfcac77: jail: Improve locking when removing prisons (authored by jamie).
jail: Improve locking when removing prisons
Feb 20 2021, 10:42 PM
jamie closed D28458: Better locking in prison_deref, and hide invalid prisons..
Feb 20 2021, 10:42 PM
jamie updated the diff for D28150: jail: Don't allow resurrection of dead jails.

Updated for cc7b73065302 and d4380c0cdd05.

Feb 20 2021, 7:19 PM
jamie updated the diff for D28515: Don't allow jail "accidental" resurrection of dead jails..

Updated for cc7b73065302 and d4380c0cdd05.

Feb 20 2021, 7:16 PM
jamie updated the diff for D28473: Add PD_KILL option to prison_deref().

Updated for cc7b73065302 and d4380c0cdd05.

Feb 20 2021, 7:12 PM
jamie updated the diff for D28458: Better locking in prison_deref, and hide invalid prisons..

Updated for cc7b73065302 and d4380c0cdd05.

Feb 20 2021, 7:08 PM
jamie updated the diff for D27876: jail: Add pr_state to struct prison.

Updated for cc7b73065302 and d4380c0cdd05.

Feb 20 2021, 7:06 PM
jamie updated the diff for D28419: Require allprison_lock and prison mutex when to free last prison reference.

Updated for cc7b73065302 and d4380c0cdd05.

Feb 20 2021, 7:01 PM

Feb 19 2021

jamie committed R10:d4380c0cdd05: jail: Change both root and working directories in jail_attach(2) (authored by jamie).
jail: Change both root and working directories in jail_attach(2)
Feb 19 2021, 10:14 PM
jamie committed R10:9f00cb5fa8a4: MFS jail: Handle a possible race between jail_remove(2) and fork(2) (authored by jamie).
MFS jail: Handle a possible race between jail_remove(2) and fork(2)
Feb 19 2021, 9:54 PM
jamie committed R10:c837631bd47a: MFC jail: Handle a possible race between jail_remove(2) and fork(2) (authored by jamie).
MFC jail: Handle a possible race between jail_remove(2) and fork(2)
Feb 19 2021, 9:50 PM
jamie committed R10:f7007a7d0525: MFC jail: Handle a possible race between jail_remove(2) and fork(2) (authored by jamie).
MFC jail: Handle a possible race between jail_remove(2) and fork(2)
Feb 19 2021, 9:45 PM
jamie committed R10:894360bacd42: MFC jail: Handle a possible race between jail_remove(2) and fork(2) (authored by jamie).
MFC jail: Handle a possible race between jail_remove(2) and fork(2)
Feb 19 2021, 1:24 AM

Feb 16 2021

jamie committed R10:cc7b73065302: jail: Handle a possible race between jail_remove(2) and fork(2) (authored by jamie).
jail: Handle a possible race between jail_remove(2) and fork(2)
Feb 16 2021, 7:28 PM

Feb 8 2021

jamie updated the diff for D28150: jail: Don't allow resurrection of dead jails.

This is now the culmination of D28419, D27876, D28458, D28473, and D28515. The only thing remaining in this patch is the part that doesn't resurrect dying jails via jail_set, and instead renumbers the dying jails as necessary, and the userspace/man changes from before.

Feb 8 2021, 2:11 AM
jamie updated the diff for D28515: Don't allow jail "accidental" resurrection of dead jails..

Fix up prison_deref_kill, which had some typos in which prison it was acting on. Also move prisons off of their parent's child lists along with the loop instead of all at the end.

Feb 8 2021, 1:59 AM

Feb 6 2021

jamie requested review of D28515: Don't allow jail "accidental" resurrection of dead jails..
Feb 6 2021, 9:21 PM

Feb 4 2021

jamie committed R10:4c44dbde5491: MFC jail: Handle a parent jail when a child is added to it (authored by jamie).
MFC jail: Handle a parent jail when a child is added to it
Feb 4 2021, 11:17 PM
jamie committed R10:7726fc9940d6: MFC jail: fix dangling reference bug from 6754ae2572eb (authored by jamie).
MFC jail: fix dangling reference bug from 6754ae2572eb
Feb 4 2021, 11:17 PM
jamie committed R10:3f3b216c0b4b: MFC jail: A jail could be removed without calling OSD methods (authored by jamie).
MFC jail: A jail could be removed without calling OSD methods
Feb 4 2021, 11:17 PM

Feb 3 2021

jamie requested review of D28473: Add PD_KILL option to prison_deref().
Feb 3 2021, 9:43 PM

Feb 2 2021

jamie requested review of D28458: Better locking in prison_deref, and hide invalid prisons..
Feb 2 2021, 5:41 AM

Jan 30 2021

jamie added inline comments to D27876: jail: Add pr_state to struct prison.
Jan 30 2021, 5:33 PM
jamie updated the diff for D27876: jail: Add pr_state to struct prison.

A new version, built on top of D28419, and updated with other recent jail changes. With the addition of prison_isvalid() and prison_isalive(), the changes are significantly reduced.

Jan 30 2021, 2:15 AM
jamie updated the diff for D28419: Require allprison_lock and prison mutex when to free last prison reference.

Update for c050ea803eaa and add suggested mtx_assert.

Jan 30 2021, 2:00 AM

Jan 29 2021

jamie added inline comments to D28419: Require allprison_lock and prison mutex when to free last prison reference.
Jan 29 2021, 9:26 PM
jamie requested review of D28419: Require allprison_lock and prison mutex when to free last prison reference.
Jan 29 2021, 7:42 PM
jamie committed R10:c050ea803eaa: jail: Handle a parent jail when a child is added to it (authored by jamie).
jail: Handle a parent jail when a child is added to it
Jan 29 2021, 5:52 AM

Jan 28 2021

jamie added inline comments to D28150: jail: Don't allow resurrection of dead jails.
Jan 28 2021, 4:42 PM

Jan 27 2021

jamie added inline comments to D28150: jail: Don't allow resurrection of dead jails.
Jan 27 2021, 11:37 PM
jamie added a comment to D28150: jail: Don't allow resurrection of dead jails.
In D28150#634852, @bz wrote:

I am not sure I like the idea of making jid's a first-class citizen just because our mgmt interface once did and we kept it for historic purpose and backward compat and habits are hard to change.

I am also not entirely opposed to the idea.

Jan 27 2021, 10:14 PM

Jan 26 2021

jamie updated the diff for D28150: jail: Don't allow resurrection of dead jails.

Update for various changes recently checked in to kern_jail.c.

Jan 26 2021, 4:52 AM

Jan 25 2021

jamie abandoned D27876: jail: Add pr_state to struct prison.

It doesn't really make sense for this to be a separate revision, considering it's part of D28150 which overwrites much of the change here. So I'm rolling it all into a single revision instead.

Jan 25 2021, 7:12 PM

Jan 22 2021

jamie committed R10:195cd6ae2481: jail: fix dangling reference bug from 6754ae2572eb (authored by jamie).
jail: fix dangling reference bug from 6754ae2572eb
Jan 22 2021, 7:01 PM
jamie committed R10:39c8ef90f6d0: jail: A jail could be removed without calling OSD methods (authored by jamie).
jail: A jail could be removed without calling OSD methods
Jan 22 2021, 6:54 PM

Jan 20 2021

jamie committed R10:6754ae2572eb: jail: Use refcount(9) for prison references. (authored by jamie).
jail: Use refcount(9) for prison references.
Jan 20 2021, 11:09 PM

Jan 19 2021

jamie committed R10:effad35ed1e5: jail: Clean up some function placement and improve comments. (authored by jamie).
jail: Clean up some function placement and improve comments.
Jan 19 2021, 1:28 AM

Jan 18 2021

jamie committed R10:83bc72a04e0d: jail: Fix a stray mutex from 76ad42abf9d4. (authored by jamie).
jail: Fix a stray mutex from 76ad42abf9d4.
Jan 18 2021, 11:48 PM
jamie committed R10:76ad42abf9d4: jail: Add prison_isvalid() and prison_isalive() (authored by jamie).
jail: Add prison_isvalid() and prison_isalive()
Jan 18 2021, 6:58 PM
jamie committed R10:25c2c952e3f6: jail: Add proper prison locking in mqfs_prison_remove. (authored by jamie).
jail: Add proper prison locking in mqfs_prison_remove.
Jan 18 2021, 1:42 AM

Jan 17 2021

jamie added inline comments to D28150: jail: Don't allow resurrection of dead jails.
Jan 17 2021, 2:39 AM
jamie added inline comments to D28150: jail: Don't allow resurrection of dead jails.
Jan 17 2021, 2:37 AM

Jan 16 2021

jamie added inline comments to D28150: jail: Don't allow resurrection of dead jails.
Jan 16 2021, 6:50 AM

Jan 15 2021

jamie added inline comments to D28150: jail: Don't allow resurrection of dead jails.
Jan 15 2021, 6:44 PM

Jan 14 2021

jamie updated the diff for D28150: jail: Don't allow resurrection of dead jails.

Add full context to diffs

Jan 14 2021, 7:01 PM
jamie updated the diff for D27876: jail: Add pr_state to struct prison.

Add full context diff for kern_jail.c

Jan 14 2021, 6:52 PM