Page MenuHomeFreeBSD

jamie (James Gritton)
User

Projects

User Details

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

Recent Activity

Mon, May 16

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

Fri, May 13

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?

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

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

Fri, May 13, 8:04 PM

Mar 28 2022

jamie committed R10:f059a2c832f8: 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 R10:c1576434e9cf: 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 R10:8f1543785f77: 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 R10:1e40fc6fa9c4: 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 R10:803d7f4ccdca: 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 R10:be7cf3f4b8c2: 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 R10:d7c4ea7d728e: 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 R10:1ee0746e1af0: 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 R10:13cb61f9723e: 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 R10:747a47261eee: 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 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