Page MenuHomeFreeBSD

jamie (James Gritton)
User

Projects

User Details

User Since
Aug 3 2014, 10:29 PM (344 w, 17 h)

Recent Activity

Thu, Mar 4

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

Looks good - nothing to add.

Thu, Mar 4, 6:39 PM

Sat, Feb 27

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.

Sat, Feb 27, 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.

Sat, Feb 27, 5:36 PM
jamie accepted D28952: jail: allow root to implicitly widen its cpuset to attach.
Sat, Feb 27, 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?

Sat, Feb 27, 12:15 AM

Fri, Feb 26

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.

Fri, Feb 26, 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?

Fri, Feb 26, 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.

Fri, Feb 26, 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"?

Fri, Feb 26, 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?

Fri, Feb 26, 4:51 AM
jamie committed R10:589e4c1df4a6: jail: Add safety around prison_deref() flags. (authored by jamie).
jail: Add safety around prison_deref() flags.
Fri, Feb 26, 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.
Fri, Feb 26, 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.

Fri, Feb 26, 3:49 AM

Thu, Feb 25

jamie committed R10:c861373bdff9: jail: re-commit 811e27fa3c44 with fixes (authored by jamie).
jail: re-commit 811e27fa3c44 with fixes
Thu, Feb 25, 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.

Thu, Feb 25, 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.
Thu, Feb 25, 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
Thu, Feb 25, 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.
Thu, Feb 25, 5:13 AM

Tue, Feb 23

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

Mon, Feb 22

jamie committed R10:701d6b50ae7b: jail: Fix a LOR introduced in 1158508a8086 (authored by jamie).
jail: Fix a LOR introduced in 1158508a8086
Mon, Feb 22, 11:55 PM
jamie closed D28473: Add PD_KILL option to prison_deref().
Mon, Feb 22, 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().
Mon, Feb 22, 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)
Mon, Feb 22, 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)
Mon, Feb 22, 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)
Mon, Feb 22, 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)
Mon, Feb 22, 5:52 AM

Sun, Feb 21

jamie closed D27876: jail: Add pr_state to struct prison.
Sun, Feb 21, 9:27 PM
jamie committed R10:1158508a8086: jail: Add pr_state to struct prison (authored by jamie).
jail: Add pr_state to struct prison
Sun, Feb 21, 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
Sun, Feb 21, 6:57 PM
jamie closed D28419: Require allprison_lock and prison mutex when to free last prison reference.
Sun, Feb 21, 6:57 PM

Sat, Feb 20

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

Updated for cc7b73065302 and d4380c0cdd05.

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

Updated for cc7b73065302 and d4380c0cdd05.

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

Updated for cc7b73065302 and d4380c0cdd05.

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

Updated for cc7b73065302 and d4380c0cdd05.

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

Updated for cc7b73065302 and d4380c0cdd05.

Sat, Feb 20, 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.

Sat, Feb 20, 7:01 PM

Fri, Feb 19

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)
Fri, Feb 19, 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)
Fri, Feb 19, 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)
Fri, Feb 19, 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)
Fri, Feb 19, 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)
Fri, Feb 19, 1:24 AM

Tue, Feb 16

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)
Tue, Feb 16, 7:28 PM

Mon, Feb 8

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.

Mon, Feb 8, 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.

Mon, Feb 8, 1:59 AM

Sat, Feb 6

jamie requested review of D28515: Don't allow jail "accidental" resurrection of dead jails..
Sat, Feb 6, 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
jamie added a reviewer for D27876: jail: Add pr_state to struct prison: bz.
Jan 14 2021, 5:42 AM
jamie added a reviewer for D28150: jail: Don't allow resurrection of dead jails: bz.
Jan 14 2021, 5:40 AM
jamie requested review of D28150: jail: Don't allow resurrection of dead jails.
Jan 14 2021, 5:32 AM

Jan 11 2021

jamie updated the diff for D27876: jail: Add pr_state to struct prison.

Updated for 2a4b22514635

Jan 11 2021, 4:01 AM

Jan 10 2021

jamie committed R10:2a4b22514635: jail: Simplify handling of prison_deref() (authored by jamie).
jail: Simplify handling of prison_deref()
Jan 10 2021, 5:06 AM

Jan 1 2021

jamie committed R10:b58a46347c8d: jail: revert the attachment part of b4e87a632955 (authored by jamie).
jail: revert the attachment part of b4e87a632955
Jan 1 2021, 3:56 AM
jamie requested review of D27876: jail: Add pr_state to struct prison.
Jan 1 2021, 1:10 AM

Dec 31 2020

jamie committed R10:b4e87a632955: jail: Clean up allprison_lock handing in kern_jail_set (authored by jamie).
jail: Clean up allprison_lock handing in kern_jail_set
Dec 31 2020, 11:19 PM

Dec 27 2020

jamie committed R10:7f4e724829e5: jail: add a missing lock around an osd_jail_call(). (authored by jamie).
jail: add a missing lock around an osd_jail_call().
Dec 27 2020, 4:57 AM
jamie committed R10:0fe74ae624fc: jail: Consistently handle the pr_allow bitmask (authored by jamie).
jail: Consistently handle the pr_allow bitmask
Dec 27 2020, 4:30 AM
jamie committed R10:43c273489523: jail: Make comments on struct prison locking more precise (authored by jamie).
jail: Make comments on struct prison locking more precise
Dec 27 2020, 1:17 AM

Dec 26 2020

jamie committed R10:7f0550463a40: MFC r368676: jail: show symbolic jailparam flags (authored by jamie).
MFC r368676: jail: show symbolic jailparam flags
Dec 26 2020, 9:04 PM
jamie committed R10:5d58f959d39b: jail: Fix lock-free access to dynamic pr.allow flags (authored by jamie).
jail: Fix lock-free access to dynamic pr.allow flags
Dec 26 2020, 8:55 PM
jamie committed R10:7de883c82f50: jail: Fix an O(n^2) loop when adding jails (authored by jamie).
jail: Fix an O(n^2) loop when adding jails
Dec 26 2020, 6:41 PM

Dec 15 2020

jamie committed rS368676: Bugfix to not hide jailparam flags, which for example changes the output.
Bugfix to not hide jailparam flags, which for example changes the output
Dec 15 2020, 8:56 PM

Dec 14 2020

jamie accepted D27352: kern: cpuset: allow jails to modify child jails' roots.

Well it certainly works as expected, but then you knew that :-).

Dec 14 2020, 12:45 AM

Dec 13 2020

jamie committed R9:c97041789045: __FreeBSD_version updates: (authored by jamie).
__FreeBSD_version updates:
Dec 13 2020, 6:02 PM
jamie committed R9:269366965248: Committo ergo sum. (authored by jamie).
Committo ergo sum.
Dec 13 2020, 5:42 PM
jamie committed R9:bdee5ba53a29: Committo ergo sum. (authored by jamie).
Committo ergo sum.
Dec 13 2020, 5:42 PM

Nov 23 2020

jamie accepted D27297: [1/2] kern: cpuset: allow cpuset_create() to take an allocated *setp.
Nov 23 2020, 9:36 PM
jamie accepted D27298: [2/2] kern: cpuset: properly rebase when attaching to a jail.
Nov 23 2020, 9:36 PM
jamie added a comment to D27298: [2/2] kern: cpuset: properly rebase when attaching to a jail.

As I had hoped, it took away the expected problem of attaching to a jail (when the process doesn't have its own visible cpuset), and ending up with the process still having its old root cpuset (though under a new anonymous masked bit). That was the real problem I see with the current setup (not that what I didn't see aren't problems as well, but at least there was something I noticed ;-).

Nov 23 2020, 5:50 AM

Nov 13 2020

jamie accepted D27128: jail: introduce per jail suser_enabled setting.

It looks to be working correctly on a quick run-through.

Nov 13 2020, 11:58 PM