Page MenuHomeFreeBSD

kevans (Kyle Evans)
User

Projects (10)

User Details

User Since
Oct 2 2015, 1:17 PM (538 w, 12 h)

Recent Activity

Thu, Jan 22

kevans committed rGeacc501eff52: truncate: fix a minor nit + add a hole-punching test.
Thu, Jan 22, 9:08 PM

Tue, Jan 20

kevans committed rG4f0342cf84db: lualoader: fix pruning of non-existent default kernel.
Tue, Jan 20, 4:10 AM
kevans committed rG919c1e19058d: bectl: log modifying functions to zpool history (authored by rob.norris_klarasystems.com).
Tue, Jan 20, 4:10 AM
kevans committed rG6dabfd3efefa: lualoader: fix pruning of non-existent default kernel.
Tue, Jan 20, 4:10 AM
kevans committed rGd3c523b6f5aa: makedev(9): drop an additional note about cdevpriv dtors.
Tue, Jan 20, 4:10 AM
kevans committed rGbc859baeea57: bectl: log modifying functions to zpool history (authored by rob.norris_klarasystems.com).
Tue, Jan 20, 4:10 AM
kevans committed rG57b08d98db0a: libutil: defer setting the MAC label until after the login class.
Tue, Jan 20, 4:10 AM
kevans committed rGb196a718ca0e: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.
Tue, Jan 20, 4:10 AM
kevans committed rGf00ebc7eb3a6: libc: fix description issues in mac_text(3)/mac_free(3).
Tue, Jan 20, 4:10 AM
kevans committed rG5b2a74210408: makedev(9): drop an additional note about cdevpriv dtors.
Tue, Jan 20, 4:09 AM
kevans committed rGe760f45b5974: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.
Tue, Jan 20, 4:09 AM
kevans committed rGd15be6d470d6: libutil: defer setting the MAC label until after the login class.
Tue, Jan 20, 4:09 AM
kevans committed rGb5b3bf57e9fb: libc: fix description issues in mac_text(3)/mac_free(3).
Tue, Jan 20, 4:09 AM
kevans committed R9:437d92b9a2ca: [PHB]: Document recent __FreeBSD_version bumps along main.
Tue, Jan 20, 4:01 AM
kevans committed rGbef0475b6810: mac(4): also list jails in the example enumeration of objects.
Tue, Jan 20, 2:58 AM
kevans committed rG3f3b53e68a7b: jail(3): fix common usage after mac.label support.
Tue, Jan 20, 2:58 AM
kevans closed D54786: jail(3): fix common usage after mac.label support.
Tue, Jan 20, 2:58 AM
kevans closed D54748: mac(4): also list jails in the example enumeration of objects.
Tue, Jan 20, 2:58 AM
kevans added a comment to D54786: jail(3): fix common usage after mac.label support.

In the interest of not leaving main broken, I'm going to push this since it's functional both with a jail policy and without- noting that I fully expect to perhaps need another round to cleanup some remaining issue(s) pertaining to the expedited timeline.

Tue, Jan 20, 2:51 AM

Mon, Jan 19

kevans updated the summary of D54786: jail(3): fix common usage after mac.label support.
Mon, Jan 19, 11:12 PM
kevans updated the diff for D54786: jail(3): fix common usage after mac.label support.

Extra fixes, also for bd55cbb50c58876

Mon, Jan 19, 10:32 PM
kevans added a comment to D54786: jail(3): fix common usage after mac.label support.

I think this is not sufficient (just to avoid a missing mac.conf entry):
I will test it thoroughly later, but for now:

# jail -c path=/ name=D54786 persist
# jls -s
Mon, Jan 19, 9:47 PM
kevans requested review of D54786: jail(3): fix common usage after mac.label support.
Mon, Jan 19, 8:19 PM
kevans added a comment to D54760: loader/lua: auto-load p9fs if vfs.root.mountfrom requires it.

(Scales a little better in the sense that one can have an image that can do any number of multiple fs, and they can only disable autoloading of specific rootfs)

Mon, Jan 19, 6:44 PM
kevans added a comment to D54760: loader/lua: auto-load p9fs if vfs.root.mountfrom requires it.

My preference would be that we add in a config.isModuleDisabled():

Mon, Jan 19, 6:43 PM

Sat, Jan 17

kevans accepted D54759: spi: use better logic for earlier change.

I'm not sure I'm convinced that dir is actually always set, but I haven't spent that much time reading the above logic. An assertion on that here might be good to try and do something useful instead of infinitely looping, but I don't insist

Sat, Jan 17, 5:35 PM
kevans added inline comments to D54734: spi(8) - "-S" option for continuous stream from standard input to bus.
Sat, Jan 17, 10:14 AM

Fri, Jan 16

kevans requested review of D54748: mac(4): also list jails in the example enumeration of objects.
Fri, Jan 16, 7:43 PM
kevans committed rG22569a1d8020: Bump __FreeBSD_version for MAC changes.
Fri, Jan 16, 9:08 AM
kevans committed rGc18631fe7958: RELNOTES: document the MAC/jail integration.
Fri, Jan 16, 9:08 AM
kevans closed D54737: RELNOTES: document the MAC/jail integration.
Fri, Jan 16, 9:08 AM
kevans requested review of D54737: RELNOTES: document the MAC/jail integration.
Fri, Jan 16, 12:26 AM
kevans committed rG1e8c28712aaf: jail: document the mac.label parameter.
Fri, Jan 16, 12:25 AM
kevans committed rGdb3b39f063d9: libjail: extend struct handlers to included MAC labels.
Fri, Jan 16, 12:25 AM
kevans committed rGbd55cbb50c58: kern: add a mac.label jail parameter.
Fri, Jan 16, 12:25 AM
kevans committed rG1af8d5652a01: libjail: start refactoring struct ioctl support.
Fri, Jan 16, 12:25 AM
kevans committed rG626fe12e2801: kern: mac: pull mac_label_copyin_string out.
Fri, Jan 16, 12:25 AM
kevans closed D54067: jail: document the mac.label parameter.
Fri, Jan 16, 12:25 AM
kevans committed rG31c2728185d1: mac_set_fd(3): add support for jail descriptors.
Fri, Jan 16, 12:25 AM
kevans committed rGd7a517eb6d77: jaildesc: add an accessor for the struct prison in a jaildesc.
Fri, Jan 16, 12:25 AM
kevans closed D53960: libjail: extend struct handlers to included MAC labels.
Fri, Jan 16, 12:25 AM
kevans closed D53958: kern: add a mac.label jail parameter.
Fri, Jan 16, 12:25 AM
kevans closed D53959: libjail: start refactoring struct ioctl support.
Fri, Jan 16, 12:25 AM
kevans committed rG8254b0dec02b: kern: mac: add various jail MAC hooks.
Fri, Jan 16, 12:25 AM
kevans closed D53957: kern: mac: pull mac_label_copyin_string out.
Fri, Jan 16, 12:25 AM
kevans committed rG92b7366e438d: mac: add macros for 5-argument SDT probes.
Fri, Jan 16, 12:25 AM
kevans closed D53956: mac_set_fd(3): add support for jail descriptors.
Fri, Jan 16, 12:25 AM
kevans closed D53955: jaildesc: add an accessor for the struct prison in a jaildesc.
Fri, Jan 16, 12:24 AM
kevans committed rG11d6ea47f06a: kern: mac: add a MAC label to struct prison.
Fri, Jan 16, 12:24 AM
kevans closed D53954: [RFC] kern: mac: add various jail MAC hooks.
Fri, Jan 16, 12:24 AM
kevans closed D54658: mac: add macros for 5-argument SDT probes.
Fri, Jan 16, 12:24 AM
kevans closed D53953: kern: mac: add a MAC label to struct prison.
Fri, Jan 16, 12:24 AM

Wed, Jan 14

kevans committed rG5e1c7867e1b9: vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE (authored by quentin.thebault_defenso.fr).
Wed, Jan 14, 12:56 AM
kevans closed D53615: vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE.
Wed, Jan 14, 12:54 AM
kevans added a reviewer for D54355: stdio: rename short _fileno to _fileno_short for legacy abi compatibility, add new int _fileno in struct __sFILE: adrian.
Wed, Jan 14, 12:49 AM
kevans added a reviewer for D54354: stdio: rename _file to _fileno in struct __sFILE: adrian.
Wed, Jan 14, 12:49 AM
kevans added reviewers for D54355: stdio: rename short _fileno to _fileno_short for legacy abi compatibility, add new int _fileno in struct __sFILE: des, jhb.
Wed, Jan 14, 12:49 AM
kevans added reviewers for D54354: stdio: rename _file to _fileno in struct __sFILE: des, jhb.

+des for recent stdio work, jhb for having worked on something like this specifically that hadn't landed

Wed, Jan 14, 12:49 AM

Sun, Jan 11

kevans requested review of D54658: mac: add macros for 5-argument SDT probes.
Sun, Jan 11, 5:20 PM

Fri, Jan 9

kevans added a reviewer for D54622: libutil: take a size_t in trimdomain(): manpages.
Fri, Jan 9, 5:02 PM
kevans requested review of D54623: libutil: avoid an out-of-bounds read in trimdomain(3).
Fri, Jan 9, 5:00 PM
kevans requested review of D54622: libutil: take a size_t in trimdomain().
Fri, Jan 9, 5:00 PM

Wed, Jan 7

kevans committed rGe30086ab4c87: lualoader: fix pruning of non-existent default kernel.
Wed, Jan 7, 6:25 PM
kevans updated the diff for D51207: truncate: fix a minor nit + add a hole-punching test.

Address review comments

Wed, Jan 7, 6:18 PM

Tue, Jan 6

kevans updated the summary of D53954: [RFC] kern: mac: add various jail MAC hooks.
Tue, Jan 6, 3:59 PM
kevans accepted D54544: ng_tty: avoid the sign extention of char.
Tue, Jan 6, 12:26 AM

Fri, Jan 2

kevans added a comment to D54168: speaker(4): drop NEEDGIANT.

Ahh, sorry, I got confused with the missing context- can you reupload this with either git-arc or -U99999, please?

Done. But IMHO I find this workflow tremendously impractical. With github I can do 1) fine-grained commits, with separate commit per logical change and 2) git push -f to update the PR.

Here all this gets mashed up together and I need to copy-paste the diff manually in a HTML form... 😭

Fri, Jan 2, 2:26 PM

Thu, Jan 1

kevans added a comment to D54168: speaker(4): drop NEEDGIANT.

Ahh, sorry, I got confused with the missing context- can you reupload this with either git-arc or -U99999, please? It's immensely useful to be able to scroll back up and confirm where different hunks are applying

Thu, Jan 1, 11:50 PM
kevans added a comment to D54168: speaker(4): drop NEEDGIANT.

I am quite confused about what happened here. Can you explain the connection between my previous note and the changes made?

Thu, Jan 1, 8:39 PM
kevans added a comment to D54168: speaker(4): drop NEEDGIANT.

I don't think this is actually sufficient, but I don't think fixing it will be all that hard. sprkopen currently uses the fact that it's locked by Giant, so you'll probably want one spkr mutex to be taken in spkropen() and spkrclose() to be sure it's only opened by a single thread (and not leaking an allocation if spkr_inbuf gets clobbered`).

Thu, Jan 1, 2:54 AM

Dec 23 2025

kevans added a comment to D53958: kern: add a mac.label jail parameter.

I'd put all new functions of sys/security/mac/mac_syscalls.c into sys/security/mac/mac_prison.c instead, as these are not really system calls, and export mac_label_copyin_string() from the former.

Dec 23 2025, 12:35 AM

Dec 20 2025

kevans added inline comments to D53958: kern: add a mac.label jail parameter.
Dec 20 2025, 10:54 PM

Dec 19 2025

kevans requested review of D54322: wg: add a more useful debug message for an unknown family.
Dec 19 2025, 10:24 PM
kevans committed rGa8c594d27779: files.amd64: remove some lines duplicated from files.x86.
Dec 19 2025, 10:18 PM
kevans closed D54295: files.amd64: remove some lines duplicated from files.x86.
Dec 19 2025, 10:17 PM
kevans added inline comments to D53954: [RFC] kern: mac: add various jail MAC hooks.
Dec 19 2025, 4:05 AM
kevans updated the diff for D53954: [RFC] kern: mac: add various jail MAC hooks.

Highlights:

  • Remove vfs_opterror() for those entry points that take the opts already
  • Move one case of mac_prison_check_get back as a special-case to avoid breaking jail enumeration.
  • Unbreak the build of this patch: prison_copy_label comes in a later change
  • Drop redundant JAIL_ATTACH check
Dec 19 2025, 4:05 AM

Dec 18 2025

kevans requested review of D54295: files.amd64: remove some lines duplicated from files.x86.
Dec 18 2025, 8:12 PM
kevans committed rG33a3ccfc1618: if_tuntap: defer transient destroy_dev() to a taskqueue.
Dec 18 2025, 3:53 AM

Dec 17 2025

kevans committed rG2a87929671e6: bectl: log modifying functions to zpool history (authored by rob.norris_klarasystems.com).
Dec 17 2025, 5:02 PM

Dec 16 2025

kevans added a comment to D53954: [RFC] kern: mac: add various jail MAC hooks.

I'm not sure I understand this last bit

Oh... It's just a pilot error on my part, sorry!

I'm already passing the struct vfsoptlist all around so that MAC modules can reject jail_[sg]et operations based on the parameters they want to fetch or set.

Don't know how I managed to forget that for a while.

I just wanted to limit propagation of struct vfsoptlist elsewhere, but passing it makes sense for some hooks, so nevermind.

Dec 16 2025, 4:03 PM
kevans added a comment to D53954: [RFC] kern: mac: add various jail MAC hooks.

I'm not too worried about that, though it does occur to me that it probably makes sense to stop setting an error in the opts for any of those checks. The MAC policy should probably have free reign over both errno and error probably in case it's some kind of custom vendor integration.

I agree, we should probably stop setting the err opt. But that doesn't solve the discoverability of whether MAC (and not, e.g., real nonexistence of a jail) was the reason some access was denied, as in non-MAC we still set "errmsg" in the VFS options.

Giving this control to MAC modules would be nice; that requires obviously changing the interface of the hooks (if you do it, please don't pass struct vfsoptlist all around, but instead some function pointer to a printf-like function, so that we can clean up the use of struct vfsoptlist in jails at some point).

Dec 16 2025, 3:51 PM
kevans added a comment to D53954: [RFC] kern: mac: add various jail MAC hooks.

Coming back to highlights, there's indeed still the problem that enumeration returns an error if the last jail is denied via mac_prison_check_get(), so doing what you suggest is probably mandatory: Put back the MAC check in the loop, and once a jail is returned, jump to a prison_found_nomac label, even a _nomac_noalive variant as to eliminate also the (harmless) redundant test.

Additionally, as mentioned before, there's that, if mac_prison_check_get() denies access, we return a VFS error saying "access denied by MAC" which would be an info leak for situations where the jail must remain hidden. E.g., we could have mac_prison_check_get() return EPERM for a visible deny and ENOENT for an invisible one, and then treat them differently with respect to vfs_opterror(). But it seems that goes farther than what you're envisioning at this point (I haven't checked further revisions in the series thoroughly yet, to see if they need something like this).

Dec 16 2025, 2:24 PM

Dec 15 2025

kevans added a comment to D53954: [RFC] kern: mac: add various jail MAC hooks.

Ping

Dec 15 2025, 4:24 AM

Dec 9 2025

kevans added a comment to D53683: tpm: crb: add support for the Pluton startmethod.

Ping; any other complaints besides the type nits? I'll fix those to use standard types for the next revision or pre commit.

Dec 9 2025, 3:42 AM

Dec 6 2025

kevans added a reviewer for D54100: cpuset: note that -c is valid with the first two forms as well: manpages.
Dec 6 2025, 4:14 AM
kevans added reviewers for D54099: kern: jail: allow specifying a cpuset.parent at creation time: Jails, manpages.
Dec 6 2025, 4:13 AM
kevans requested review of D54100: cpuset: note that -c is valid with the first two forms as well.
Dec 6 2025, 4:13 AM
kevans requested review of D54099: kern: jail: allow specifying a cpuset.parent at creation time.
Dec 6 2025, 4:13 AM
kevans requested review of D54098: kern: add KPI to derive a root from arbitrary cpuset.
Dec 6 2025, 4:13 AM
kevans requested review of D54097: kern: don't require pp/tdp for all values of `which`.
Dec 6 2025, 4:13 AM

Dec 4 2025

kevans added a reviewer for D54067: jail: document the mac.label parameter: manpages.
Dec 4 2025, 2:05 AM
kevans requested review of D54067: jail: document the mac.label parameter.
Dec 4 2025, 1:49 AM

Dec 3 2025

kevans updated the diff for D53958: kern: add a mac.label jail parameter.

Highlights:

  • Reorganize mac_get_prison() to reduce failure modes and drop the prison lock on the way out
  • Assert that the lock is in the correct state afterwards in kern_jail_get()
Dec 3 2025, 10:18 PM
kevans retitled D53958: kern: add a mac.label jail parameter from kern: a mac.label jail parameter
Dec 3 2025, 10:17 PM
kevans updated the diff for D53954: [RFC] kern: mac: add various jail MAC hooks.

Highlights:

  • Removed prison_check_list, because it's of limited value; this could pose a problem if check_get rejects a prison as lastjid enumeration would halt when MAC denied it, but that probably requires a different solution
  • Moved mac_prison_check_get calls to after found_prison, but on the tail of that last note, it might make sense to provide a found_prison_nomac and move one check back into the lastjid loop and just continue if we encounter one that we can't fetch. This would be cleaner than policies having to implement both a check_list and check_get to avoid breaking enumeration
  • Moved the attach check to the point that we're about to attach; there are other ways this can fail from external modules anyways (e.g., osd), so trying to keep it all atomic may not be worth as much as being sure that the policy can examine the current properties of the jail. This also ensures that the creation+attach case is covered
  • Add missing unlocking
Dec 3 2025, 10:16 PM
kevans updated the diff for D53953: kern: mac: add a MAC label to struct prison.

Highlights:

  • Remove mac_prison_create_init(): one would probably want to special-case prison0 earlier in mac_prison_init(), and they don't actually need to know anything about prison0 specifically: pr_parent == NULL is a good indicator of the root prison
  • Don't leak labels, call mac_prison_destroy()
  • Drop a bunch of locking assertions in label operations
Dec 3 2025, 10:07 PM
kevans added inline comments to D53958: kern: add a mac.label jail parameter.
Dec 3 2025, 8:31 PM
kevans added inline comments to D53954: [RFC] kern: mac: add various jail MAC hooks.
Dec 3 2025, 1:28 AM
kevans added inline comments to D53954: [RFC] kern: mac: add various jail MAC hooks.
Dec 3 2025, 1:23 AM