Page MenuHomeFreeBSD

kevans (Kyle Evans)
User

Projects (10)

User Details

User Since
Oct 2 2015, 1:17 PM (532 w, 5 d)

Recent Activity

Yesterday

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.

Tue, Dec 16, 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).

Tue, Dec 16, 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).

Tue, Dec 16, 2:24 PM

Mon, Dec 15

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

Ping

Mon, Dec 15, 4:24 AM

Tue, Dec 9

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.

Tue, Dec 9, 3:42 AM

Sat, Dec 6

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

Thu, Dec 4

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

Wed, Dec 3

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()
Wed, Dec 3, 10:18 PM
kevans retitled D53958: kern: add a mac.label jail parameter from kern: a mac.label jail parameter to kern: add a mac.label jail parameter.
Wed, Dec 3, 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
Wed, Dec 3, 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
Wed, Dec 3, 10:07 PM
kevans added inline comments to D53958: kern: add a mac.label jail parameter.
Wed, Dec 3, 8:31 PM
kevans added inline comments to D53954: [RFC] kern: mac: add various jail MAC hooks.
Wed, Dec 3, 1:28 AM
kevans added inline comments to D53954: [RFC] kern: mac: add various jail MAC hooks.
Wed, Dec 3, 1:23 AM
kevans added inline comments to D53954: [RFC] kern: mac: add various jail MAC hooks.
Wed, Dec 3, 1:19 AM

Tue, Dec 2

kevans added inline comments to D53953: kern: mac: add a MAC label to struct prison.
Tue, Dec 2, 3:33 PM
kevans added inline comments to D53814: bhyve: add UNIX domain socket support to rfb.
Tue, Dec 2, 2:53 PM
kevans accepted D53814: bhyve: add UNIX domain socket support to rfb.
Tue, Dec 2, 5:05 AM
kevans added a comment to D53814: bhyve: add UNIX domain socket support to rfb.

Added a unix: prefix for UNIX domain sockets

This enables the use of relative paths.
To avoid parsing the configuration value twice, I decided to pass a sa_family_t parameter to the rfb_init function. I hope that is an acceptable way to implement it.

Tue, Dec 2, 5:05 AM

Mon, Dec 1

kevans added inline comments to D53814: bhyve: add UNIX domain socket support to rfb.
Mon, Dec 1, 2:50 PM

Sun, Nov 30

kevans accepted D53991: 15.0/relnotes: Mention new ascii loader art option.
Sun, Nov 30, 3:09 AM

Thu, Nov 27

kevans requested review of D53960: libjail: extend struct handlers to included MAC labels.
Thu, Nov 27, 6:38 PM
kevans requested review of D53959: libjail: start refactoring struct ioctl support.
Thu, Nov 27, 6:38 PM
kevans requested review of D53958: kern: add a mac.label jail parameter.
Thu, Nov 27, 6:38 PM
kevans requested review of D53957: kern: mac: pull mac_label_copyin_string out.
Thu, Nov 27, 6:37 PM
kevans requested review of D53956: mac_set_fd(3): add support for jail descriptors.
Thu, Nov 27, 6:37 PM
kevans requested review of D53955: jaildesc: add an accessor for the struct prison in a jaildesc.
Thu, Nov 27, 6:37 PM
kevans requested review of D53954: [RFC] kern: mac: add various jail MAC hooks.
Thu, Nov 27, 6:37 PM
kevans requested review of D53953: kern: mac: add a MAC label to struct prison.
Thu, Nov 27, 6:37 PM

Mon, Nov 24

kevans accepted D53814: bhyve: add UNIX domain socket support to rfb.

Implementation looks fine to me, but I defer to bhyve-y folks for final review... in particular, I do wonder if they might prefer some more explicit prefix like unix:/path/to/sock

Mon, Nov 24, 11:28 PM

Sun, Nov 23

kevans added inline comments to D53814: bhyve: add UNIX domain socket support to rfb.
Sun, Nov 23, 1:28 AM

Mon, Nov 17

kevans added a comment to D53781: iwx: tag RX frames as A_MPDU RX; tag A-MSDU frames appropriately.

Just dropping a note that this leads to ~10x throughput to pkg.f.o on my laptop -- previously averaging somewhere around ~2-3mbit/s due to constant out-of-order acks, up to ~25-30 mbit/s on average

Mon, Nov 17, 11:20 PM · wireless

Nov 16 2025

kevans accepted D53772: setcred(): Remove an optimization for when cr_groups[0] was the egid.
Nov 16 2025, 2:26 AM

Nov 15 2025

kevans committed rGc490bc73eb68: tpm: fix the conditional for the arm64 build (authored by kevans).
tpm: fix the conditional for the arm64 build
Nov 15 2025, 2:23 AM
kevans committed rGcca34aa1d005: tpm: crb: factor out idle/ready state transitions (authored by kevans).
tpm: crb: factor out idle/ready state transitions
Nov 15 2025, 2:23 AM
kevans closed D53682: tpm: crb: factor out idle/ready state transitions.
Nov 15 2025, 2:23 AM
kevans committed rG1d678ba57569: lam: fix using stdin more than once (authored by kevans).
lam: fix using stdin more than once
Nov 15 2025, 12:28 AM

Nov 14 2025

kevans added inline comments to D50727: loader.8: Document module commands.
Nov 14 2025, 2:52 PM
kevans accepted D50727: loader.8: Document module commands.
Nov 14 2025, 2:51 PM
kevans closed D53750: lam: fix using stdin more than once.
Nov 14 2025, 2:37 PM
kevans committed rG6a9452c8378a: lam: fix using stdin more than once (authored by kevans).
lam: fix using stdin more than once
Nov 14 2025, 2:37 PM
kevans added inline comments to D53750: lam: fix using stdin more than once.
Nov 14 2025, 2:34 PM
kevans added a comment to D53750: lam: fix using stdin more than once.

I suggested via email:

diff
--- a/usr.bin/lam/lam.c
+++ b/usr.bin/lam/lam.c
@@ -213,11 +213,11 @@ gatherline(struct openfile *ip)
        *p = '\0';
        if (c == EOF) {
                ip->eof = 1;
+               if (ip->fp == stdin)
+                       fclose(stdin);
                if (ferror(ip->fp)) {
                        err(EX_IOERR, NULL);
                }
-               if (ip->fp == stdin)
-                       fclose(stdin);
                morefiles--;
                return (pad(ip));
        }

But this is fine as well. Plus, it has tests!

Nov 14 2025, 3:38 AM
kevans added a comment to D53683: tpm: crb: add support for the Pluton startmethod.

Hmm, the definition came in here:

Nov 14 2025, 3:32 AM
kevans updated the diff for D53682: tpm: crb: factor out idle/ready state transitions.

-1 -> 0

Nov 14 2025, 3:10 AM
kevans added inline comments to D53682: tpm: crb: factor out idle/ready state transitions.
Nov 14 2025, 3:10 AM
kevans requested review of D53750: lam: fix using stdin more than once.
Nov 14 2025, 1:53 AM

Nov 11 2025

kevans updated the test plan for D53683: tpm: crb: add support for the Pluton startmethod.
Nov 11 2025, 5:13 PM
kevans updated the diff for D53683: tpm: crb: add support for the Pluton startmethod.

Add missing size check to the startmethod _attach()

Nov 11 2025, 4:40 AM
kevans requested review of D53683: tpm: crb: add support for the Pluton startmethod.
Nov 11 2025, 1:55 AM
kevans requested review of D53682: tpm: crb: factor out idle/ready state transitions.
Nov 11 2025, 1:55 AM

Nov 7 2025

kevans committed rG51c5e2b60247: libsys: install manpage links for jail_attach_jd/jail_remove_jd (authored by csjp).
libsys: install manpage links for jail_attach_jd/jail_remove_jd
Nov 7 2025, 1:12 AM

Nov 6 2025

kevans accepted D53615: vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE.

I know ray@ pops in sometimes so we might give him (and Ed) a little time to object, but I also didn't really see a reason to impose this particular limit. I did wonder if it was just an oversight because NSIG on other platforms *does* usually cover all valid signals (as far as I've observed)

Nov 6 2025, 2:30 PM
kevans accepted D53610: ncurses: Move termcap and tabset to ncurses-lib.
Nov 6 2025, 3:00 AM

Nov 5 2025

kevans committed rG737edb8fb52b: posix_fallocate(2): move unsupported case to EOPNOTSUPP (authored by kevans).
posix_fallocate(2): move unsupported case to EOPNOTSUPP
Nov 5 2025, 12:32 AM
kevans committed rGb87436d8be8e: nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2) (authored by kevans).
nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2)
Nov 5 2025, 12:31 AM
kevans committed rGfa393807c57e: fusefs: standardize on OPNOTSUPP for posix_fallocate(2) (authored by kevans).
fusefs: standardize on OPNOTSUPP for posix_fallocate(2)
Nov 5 2025, 12:31 AM
kevans closed D53537: posix_fallocate(2): move unsupported case to EOPNOTSUPP.
Nov 5 2025, 12:31 AM
kevans closed D53536: nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2).
Nov 5 2025, 12:31 AM
kevans closed D53535: fusefs: standardize on OPNOTSUPP for posix_fallocate(2).
Nov 5 2025, 12:31 AM
kevans committed rG96c1d8db39df: if_tuntap: defer transient destroy_dev() to a taskqueue (authored by kevans).
if_tuntap: defer transient destroy_dev() to a taskqueue
Nov 5 2025, 12:28 AM
kevans committed rG90314c04f10f: makedev(9): drop an additional note about cdevpriv dtors (authored by kevans).
makedev(9): drop an additional note about cdevpriv dtors
Nov 5 2025, 12:28 AM
kevans closed D53439: makedev(9): drop an additional note about cdevpriv dtors.
Nov 5 2025, 12:28 AM
kevans closed D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Nov 5 2025, 12:28 AM

Nov 4 2025

kevans added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Nov 4 2025, 10:20 PM
kevans added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Nov 4 2025, 6:15 PM
kevans added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Nov 4 2025, 6:11 PM
kevans updated the diff for D53537: posix_fallocate(2): move unsupported case to EOPNOTSUPP.

Describe the switch a little more in HISTORY and update the STANDARDS; the
notable changes since -2004 are this different error return and clarification
of EFBIG to surface if the file size limit is exceeded (with generation of a
SIGXFSZ).

Nov 4 2025, 3:32 PM
kevans updated the diff for D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.

Do a read-once load of si_drv1, just in case. Amend the comment to try and
describe our solution more completely

Nov 4 2025, 6:14 AM
kevans committed rG94360584542a: ipfw: pmod: avoid further rule processing after tcp-mod failures (authored by kevans).
ipfw: pmod: avoid further rule processing after tcp-mod failures
Nov 4 2025, 12:54 AM
kevans committed rGdeb684f9d1d6: ipfw: pmod: avoid further rule processing after tcp-mod failures (authored by kevans).
ipfw: pmod: avoid further rule processing after tcp-mod failures
Nov 4 2025, 12:54 AM
kevans committed rG21d55ae111aa: ipfw: pmod: avoid further rule processing after tcp-mod failures (authored by kevans).
ipfw: pmod: avoid further rule processing after tcp-mod failures
Nov 4 2025, 12:53 AM

Nov 3 2025

kevans accepted D53545: ifconfig: Fix invalid free() in ifbridge.
Nov 3 2025, 4:59 PM
kevans added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Nov 3 2025, 1:56 AM

Nov 2 2025

kevans added inline comments to D53535: fusefs: standardize on OPNOTSUPP for posix_fallocate(2).
Nov 2 2025, 5:14 PM
kevans updated the diff for D53535: fusefs: standardize on OPNOTSUPP for posix_fallocate(2).

Correct it for the file-specific unsupported mode as well

Nov 2 2025, 4:47 PM
kevans updated the diff for D53535: fusefs: standardize on OPNOTSUPP for posix_fallocate(2).

Fix observed test failures; there's only a few places that we expect EINVAL.

Nov 2 2025, 3:49 PM
kevans requested review of D53537: posix_fallocate(2): move unsupported case to EOPNOTSUPP.
Nov 2 2025, 3:20 PM
kevans requested review of D53536: nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2).
Nov 2 2025, 3:20 PM
kevans requested review of D53535: fusefs: standardize on OPNOTSUPP for posix_fallocate(2).
Nov 2 2025, 3:20 PM
kevans updated the diff for D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.

Simplify a bit using the net epoch

Nov 2 2025, 3:02 PM

Nov 1 2025

kevans added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Nov 1 2025, 6:20 PM
kevans committed rGc0382512bfce: ipfw: pmod: avoid further rule processing after tcp-mod failures (authored by kevans).
ipfw: pmod: avoid further rule processing after tcp-mod failures
Nov 1 2025, 5:35 PM

Oct 31 2025

kevans added a comment to D52740: inetd.8: Remove the enumeration of examples.
In D52740#1221574, @0mp wrote:

(not a inetd-sme) I thought they were Nm because these utilities are part of inetd?

AFAIU, these utilities are just called by inetd and are not internal. I've not checked the code but my understanding is that inetd is able to run any service the user specifies in the config file.

Oct 31 2025, 5:40 PM

Oct 30 2025

kevans updated the diff for D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.

Dance around tunmtx to protect against concurrent tun_destroy() / tunopen()

Oct 30 2025, 1:59 AM

Oct 29 2025

kevans committed rGd617806aac14: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails (authored by kevans).
libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails
Oct 29 2025, 4:33 PM
kevans closed D52295: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.
Oct 29 2025, 4:33 PM
kevans requested review of D53439: makedev(9): drop an additional note about cdevpriv dtors.
Oct 29 2025, 3:19 PM
kevans requested review of D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Oct 29 2025, 3:19 PM
kevans committed rG98edcbcce0a4: libutil: defer setting the MAC label until after the login class (authored by kevans).
libutil: defer setting the MAC label until after the login class
Oct 29 2025, 2:38 AM
kevans closed D53362: libutil: defer setting the MAC label until after the login class.
Oct 29 2025, 2:37 AM
kevans added inline comments to D53256: nvme: Fix PRP list size calculation.
Oct 29 2025, 2:34 AM

Oct 27 2025

kevans abandoned D52703: netgraph: ng_device: set curvnet when writing from the cdev.

Already landed in a505b80b2f038409300cd05e2ea95822942404e2, and it's clear nobody is using it in a way that this is urgent to MFC independently

Oct 27 2025, 2:35 PM

Oct 26 2025

kevans committed rG081218b7a200: libc: fix description issues in mac_text(3)/mac_free(3) (authored by kevans).
libc: fix description issues in mac_text(3)/mac_free(3)
Oct 26 2025, 3:14 PM