Page MenuHomeFreeBSD
Feed Advanced Search

Dec 10 2022

jamie added inline comments to D37637: Patch jail so that it can support mountd/nfsd in a vnet jail.
Dec 10 2022, 3:47 AM

Dec 9 2022

jamie added a comment to D37637: Patch jail so that it can support mountd/nfsd in a vnet jail.

Also, the jail.8 man page should have the parameter, which is a good place to mention the requirements for using it.

Dec 9 2022, 10:52 PM
jamie added inline comments to D37637: Patch jail so that it can support mountd/nfsd in a vnet jail.
Dec 9 2022, 10:50 PM
jamie added inline comments to D37637: Patch jail so that it can support mountd/nfsd in a vnet jail.
Dec 9 2022, 10:04 PM
jamie added a comment to D37637: Patch jail so that it can support mountd/nfsd in a vnet jail.

What's the purpose of nfsd_call_vnet_cleanup being a function pointer? If it's because you need VNET_NFSD for it to exist, it should do to have #ifdef VNET_NFSD in prison_cleanup(). If it's to handle nfsd being dynamically loaded, the canonical way to handle it is via the OSD system, where the osd_jail_call(...PR_METHOD_REMOVE) would handle it. Or is there a third reason I don't know?

Dec 9 2022, 5:54 PM

Aug 31 2022

jamie accepted D34522: jail: add process iterator.
Aug 31 2022, 7:43 PM

Jul 3 2022

jamie committed rGcf18a61708d3: MFC jail: Remove a prison's shared memory when it dies (authored by jamie).
MFC jail: Remove a prison's shared memory when it dies
Jul 3 2022, 7:27 PM
jamie committed rG06dcf1499bf5: MFC jail: add prison_cleanup() to release resources held by a dying jail (authored by jamie).
MFC jail: add prison_cleanup() to release resources held by a dying jail
Jul 3 2022, 7:26 PM

Jun 29 2022

jamie committed rG7060da62ff18: jail: Remove a prison's shared memory when it dies (authored by jamie).
jail: Remove a prison's shared memory when it dies
Jun 29 2022, 5:49 PM
jamie committed rGa9f7455c38c1: jail: add prison_cleanup() to release resources held by a dying jail (authored by jamie).
jail: add prison_cleanup() to release resources held by a dying jail
Jun 29 2022, 5:37 PM

May 16 2022

jamie accepted D34563: devfs.rules: Do not expose "log" in the default devfs rules..
May 16 2022, 2:57 AM · Jails

May 13 2022

jamie added a comment to D35198: sysvsem: Fix a typo..

Wow, that has been there for an embarrassingly long time!

Well, it's not a bug)) because the rpr cannot be NULL AFAIR, or Im missed something?

May 13 2022, 9:10 PM
jamie accepted D35198: sysvsem: Fix a typo..

Wow, that has been there for an embarrassingly long time!

May 13 2022, 8:04 PM

Mar 28 2022

jamie committed rGf059a2c832f8: mfc jail: handle jailsys parameters in modification permission test (authored by jamie).
mfc jail: handle jailsys parameters in modification permission test
Mar 28 2022, 11:42 PM
jamie committed rGc1576434e9cf: mfc jail: handle jailsys parameters in modification permission test (authored by jamie).
mfc jail: handle jailsys parameters in modification permission test
Mar 28 2022, 11:41 PM

Mar 26 2022

jamie committed rG8f1543785f77: jail: handle jailsys parameters in modification permission test (authored by jamie).
jail: handle jailsys parameters in modification permission test
Mar 26 2022, 2:17 AM

Mar 12 2022

jamie added inline comments to D34522: jail: add process iterator.
Mar 12 2022, 6:27 PM

Mar 2 2022

jamie committed rG1e40fc6fa9c4: MFC posixshm: Add a -j option to posixshmcontrol ls, to specify a jail (authored by jamie).
MFC posixshm: Add a -j option to posixshmcontrol ls, to specify a jail
Mar 2 2022, 11:13 PM
jamie committed rG803d7f4ccdca: posixshm: Allow jails to use kern.ipc.posix_shm_list (authored by jamie).
posixshm: Allow jails to use kern.ipc.posix_shm_list
Mar 2 2022, 11:10 PM

Feb 27 2022

jamie committed rGbe7cf3f4b8c2: posixshm: Add a -j option to posixshmcontrol ls, to specify a jail (authored by jamie).
posixshm: Add a -j option to posixshmcontrol ls, to specify a jail
Feb 27 2022, 1:47 AM

Feb 24 2022

jamie committed rGd7c4ea7d728e: posixshm: Allow jails to use kern.ipc.posix_shm_list (authored by jamie).
posixshm: Allow jails to use kern.ipc.posix_shm_list
Feb 24 2022, 5:33 PM

Dec 19 2021

jamie accepted D33339: jail: network epoch protection for IP address lists.
Dec 19 2021, 9:27 PM

Dec 16 2021

jamie added inline comments to D33339: jail: network epoch protection for IP address lists.
Dec 16 2021, 1:45 AM
jamie added a comment to D33339: jail: network epoch protection for IP address lists.

@jamie I actually got one more question about this code. The code that checks for IP addresses clashing, in the old code under comment that starts "Check for conflicting IP addresses", in the new code separated into function prison_ip_conflict_check(), it would not allow to create a child that has IP address of a parent if parent has multiple addresses
...
So my patch doesn't change this behavior, but it seems counter-intuitive to me. And the comment actually says it is intended:

If there is a duplicate on a jail with more than one IP stop checking and return error.

Why so?

Dec 16 2021, 1:42 AM

Dec 15 2021

jamie added inline comments to D33339: jail: network epoch protection for IP address lists.
Dec 15 2021, 10:41 PM
jamie added inline comments to D33339: jail: network epoch protection for IP address lists.
Dec 15 2021, 8:01 PM

Dec 14 2021

jamie accepted D33340: inpcb: use epoch protection when doing prison checks.

I take it this is for what we're seeing in Bug 260335.

Dec 14 2021, 5:20 PM

Dec 9 2021

jamie added inline comments to D33339: jail: network epoch protection for IP address lists.
Dec 9 2021, 5:07 AM

Nov 11 2021

jamie added a comment to D32934: jail(8): cleanup jail when not persisting.

This presupposes that a jail that isn't marked to persist isn't going to stick around for some other reason. A jail could be started for example to start a long-running daemon, or to be a parent of other jails. Automatically going away when its task is done is a feature of such a jail.

Nov 11 2021, 1:59 AM

Oct 7 2021

jamie committed rG1ee0746e1af0: MFC uipc_shm: Fix kern.ipc.posix_shm_list for jails (authored by jamie).
MFC uipc_shm: Fix kern.ipc.posix_shm_list for jails
Oct 7 2021, 4:41 PM
jamie committed rG13cb61f9723e: MFC uipc_shm: Fix kern.ipc.posix_shm_list for jails (authored by jamie).
MFC uipc_shm: Fix kern.ipc.posix_shm_list for jails
Oct 7 2021, 4:34 PM

Sep 29 2021

jamie committed rG747a47261eee: Fix error return of kern.ipc.posix_shm_list, which caused it (and thus (authored by jamie).
Fix error return of kern.ipc.posix_shm_list, which caused it (and thus
Sep 29 2021, 5:23 PM

Sep 4 2021

jamie accepted D29659: jail: convert several functions from int to bool.
Sep 4 2021, 10:27 PM · Jails

Jul 27 2021

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

Jul 27 2021, 11:10 PM

Jun 24 2021

jamie committed rG75befde07bdf: 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 rGade910f43b70: 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 rG6e2623c012c3: 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 rG5bf6dca2c6db: 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 rG73b04801b316: 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 rGbdb392c1d354: 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 rG6186592c106b: 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.
In D29659#665126, @me_igalic.co wrote:

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 rG8c1d956ffa03: 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 rGd2bbfc375487: 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 rG246339530348: 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 rG811e27fa3c44: jail: Add PD_KILL to remove a prison in prison_deref().: rG246339530348: 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(): rG246339530348: MFC jail: Add PD_KILL to remove a prison in prison_deref()..
Mar 12 2021, 6:49 PM
jamie committed rG2bfecbef9a57: 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 rGad259c473dc6: 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 rGfe6b360a6293: 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.
In D28952#648258, @me_igalic.co wrote:

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 rG589e4c1df4a6: 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 rG108a9384e9e9: 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 rGc861373bdff9: 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 rG811e27fa3c44: jail: Add PD_KILL to remove a prison in prison_deref().: rGddfffb41a22d: jail: back out 811e27fa3c44 until it doesn't break Jenkins.
Feb 25 2021, 5:13 AM
jamie committed rGddfffb41a22d: 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(): rGddfffb41a22d: jail: back out 811e27fa3c44 until it doesn't break Jenkins.
Feb 25 2021, 5:13 AM

Feb 23 2021

jamie committed rG0a2a96f35a4c: 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 rG701d6b50ae7b: 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 rG811e27fa3c44: 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 rG570121808a76: 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 rGca9ab8ea1774: 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 rGf3f042d850ba: 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 rG5dbb407145c8: 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 rG1158508a8086: 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 rGf7496dcab036: 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 rG6e1d1bfcac77: 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 rGd4380c0cdd05: 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 rG9f00cb5fa8a4: 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 rGc837631bd47a: 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 rGf7007a7d0525: 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 rG894360bacd42: 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