Page MenuHomeFreeBSD

kevans (Kyle Evans)
User

Projects (10)

User Details

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

Recent Activity

Fri, Sep 26

kevans added a comment to D52308: virtual_oss: Port to base.

Something like the patch below (applied to each virtual_oss subdir) works. It's gross, but we're already doing this in e.g. lib/googletest/gmock/Makefile

Fri, Sep 26, 8:13 PM
kevans committed R11:28b80775182a: sysutils/ucored: add a new port for user core collection (authored by kevans).
sysutils/ucored: add a new port for user core collection
Fri, Sep 26, 3:58 AM

Thu, Sep 25

kevans added inline comments to D52740: inetd.8: Remove the enumeration of examples.
Thu, Sep 25, 11:05 PM
kevans added inline comments to D52740: inetd.8: Remove the enumeration of examples.
Thu, Sep 25, 11:03 PM
kevans added inline comments to D50289: build.7: Improve building pkgbase.
Thu, Sep 25, 3:26 AM · pkgbase

Wed, Sep 24

kevans abandoned D52641: libc: fix the initgroups(3) compat path.

OBE

Wed, Sep 24, 3:11 PM
kevans requested review of D52703: netgraph: ng_device: set curvnet when writing from the cdev.
Wed, Sep 24, 1:15 AM

Tue, Sep 23

kevans added inline comments to D52702: ng_tty: don't increment m_data.
Tue, Sep 23, 10:16 PM
kevans added inline comments to D52702: ng_tty: don't increment m_data.
Tue, Sep 23, 10:13 PM
kevans accepted D52666: Makefile.inc1: Handle pkg development versions.
Tue, Sep 23, 9:39 PM

Mon, Sep 22

kevans accepted D52672: libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0.

It does make me wonder about all of the freebsd11_* bits in the same file that we use for pre-ino64 stuff, but my main concern is just fixing initgroups(3) for stable/15... we can always haggle on any other details later, if we need to.

Mon, Sep 22, 3:52 AM

Sun, Sep 21

kevans accepted D52652: iwx: re-add sequence numbers for non-AMPDU, preserving previous behaviour.

This fixes the AX210 in my frame.work that previously made it through association and DHCP, then stopped passing traffic. Thanks!

Sun, Sep 21, 5:37 PM · wireless
kevans added a reviewer for D52652: iwx: re-add sequence numbers for non-AMPDU, preserving previous behaviour: kevans.
Sun, Sep 21, 3:43 PM · wireless

Sat, Sep 20

kevans added inline comments to D52641: libc: fix the initgroups(3) compat path.
Sat, Sep 20, 2:11 PM
kevans added inline comments to D52641: libc: fix the initgroups(3) compat path.
Sat, Sep 20, 1:31 PM
kevans requested review of D52641: libc: fix the initgroups(3) compat path.
Sat, Sep 20, 4:31 AM

Wed, Sep 17

kevans accepted D52562: packages: Mark all sets as vital.

Yeah, I'm happy with that, thanks. I recognize this is maybe not ideal for more flexible system construction (piece together your own based on a set and removing some), but IMO we should err on the side of caution and consider whether we can do something to enable better behavior with the final form of pkg groups.

Wed, Sep 17, 6:52 PM

Tue, Sep 16

kevans added inline comments to D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.
Tue, Sep 16, 4:51 PM
kevans added inline comments to D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.
Tue, Sep 16, 4:34 PM
kevans updated subscribers of D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.
Tue, Sep 16, 1:55 PM
kevans accepted D52572: audit: Return ENOSYS if priv_check fails in audit system calls.
Tue, Sep 16, 1:46 PM
kevans added a comment to D52562: packages: Mark all sets as vital.
In D52562#1200178, @ivy wrote:

I think my complaint is that, iirc, all of the metapackage dependencies are marked as automatic. As soon as they break the set as you suggest, the remainder would be subject to autoremove

right, but if you run pkg remove FreeBSD-set-devel followed by pkg autoremove, don't you expect all of clang etc. to be removed?

if the user does this by accident then runs pkg autoremove, they will see it's trying to remove FreeBSD-clang or whatever and can abort and rectify the situation.

Tue, Sep 16, 1:27 AM

Mon, Sep 15

kevans added a comment to D52562: packages: Mark all sets as vital.

I think my complaint is that, iirc, all of the metapackage dependencies are marked as automatic. As soon as they break the set as you suggest, the remainder would be subject to autoremove

Mon, Sep 15, 11:15 PM
kevans added inline comments to D52495: sed: bring usage back into line with reality.
Mon, Sep 15, 9:03 PM
kevans accepted D52527: init: Use root's home directory in single-user mode.

Yeah, this seems fine to me. I did wonder for a second if the /rescue variants of shells do or should assume setugid behavior and avoid loading dotfiles in case something in the profile or other bits finds a way to make the shell unusable, but I didn't really convince myself.

Mon, Sep 15, 3:12 AM

Sun, Sep 14

kevans updated the summary of D52498: bectl: fail if an invalid sort key is used.
Sun, Sep 14, 4:17 PM
kevans updated the diff for D52498: bectl: fail if an invalid sort key is used.

Account for origin not existing, use an empty string; add tests

Sun, Sep 14, 4:16 PM
kevans added a comment to D52498: bectl: fail if an invalid sort key is used.

@kevans can you have a look at your patch in bug 266496? (link)
I think nvlist_lookup_string can also return non-zero if one uses "origin" as key and the boot environment doesn't have an origin data set.

Sun, Sep 14, 1:50 AM

Sat, Sep 13

kevans committed rG91ea7e2ce2b5: libc: fix the _FORTIFY_SOURCE build of getgrouplist(3) (authored by kevans).
libc: fix the _FORTIFY_SOURCE build of getgrouplist(3)
Sat, Sep 13, 10:24 PM

Fri, Sep 12

kevans accepted D52499: syscalls: Old setgroups(2)/getgroups(2): Remove superfluous STD type.

Whoops, good shout.

Fri, Sep 12, 3:32 PM
kevans requested review of D52498: bectl: fail if an invalid sort key is used.
Fri, Sep 12, 3:22 PM
kevans requested review of D52495: sed: bring usage back into line with reality.
Fri, Sep 12, 12:30 AM

Thu, Sep 11

kevans added inline comments to D52481: stat: Add option to list holes.
Thu, Sep 11, 7:34 PM
kevans added inline comments to D52481: stat: Add option to list holes.
Thu, Sep 11, 5:04 PM
kevans added inline comments to D52481: stat: Add option to list holes.
Thu, Sep 11, 1:47 PM

Wed, Sep 10

kevans accepted D52470: src.sys.mk: Support src.conf in SRCTOP.

Thanks!

Wed, Sep 10, 4:48 PM
kevans added inline comments to D52470: src.sys.mk: Support src.conf in SRCTOP.
Wed, Sep 10, 3:07 PM
kevans added a comment to D52470: src.sys.mk: Support src.conf in SRCTOP.

Can we preemptively add /src.conf to .gitignore if we do this?

Wed, Sep 10, 2:27 PM

Mon, Sep 8

kevans added inline comments to D52308: virtual_oss: Port to base.
Mon, Sep 8, 3:41 PM

Sat, Sep 6

kevans added a comment to D52402: stand: Remove Spleen 32x64 fonts from INDEX.
In D52402#1196665, @jrm wrote:

Oh, sorry. One can't add screen.font=32x64 to /boot/loader.conf to get the Spleen fonts? I really can't tell much of a difference between the fonts on my system.

Sat, Sep 6, 2:37 AM

Thu, Sep 4

kevans added a reverting change for rG65059dd2b6f9: pseudofs: defer initialization until first mount: rGd3462294c1f0: Revert "pseudofs: defer initialization until first mount".
Thu, Sep 4, 12:53 PM
kevans added a reverting change for D52156: pseudofs: defer initialization until first mount: rGd3462294c1f0: Revert "pseudofs: defer initialization until first mount".
Thu, Sep 4, 12:53 PM
kevans committed rGd3462294c1f0: Revert "pseudofs: defer initialization until first mount" (authored by kevans).
Revert "pseudofs: defer initialization until first mount"
Thu, Sep 4, 12:53 PM
kevans added a comment to D52350: misc/fortune-mod-mormon: New port.

I would, however, hassle you a little bit over a commit message nit. One might look and notice that fortune-mod-bible has a dance to try and be compatible with different locations of strfile, but a little bit of archaeology reveals that @cperciva killed off the need for that back in 2015 (rG11d9aa670723f508821f2bf6980a555360783a80), so there's no remaining version of FreeBSD that will not have strfile in a stock configuration (and we don't really account for special pkgbase configurations today in ports, and maybe we won't tomorrow, either). I would proactively note in the commit message that the strfile dance found in other fortune data ports isn't necessary today to preempt concerns there.

Thu, Sep 4, 2:26 AM
kevans committed rGa2f08d0ddc29: pseudofs: return errors from pfs_create_*() (authored by kevans).
pseudofs: return errors from pfs_create_*()
Thu, Sep 4, 2:11 AM
kevans closed D52157: pseudofs: return errors from pfs_create_*().
Thu, Sep 4, 2:11 AM
kevans committed rG65059dd2b6f9: pseudofs: defer initialization until first mount (authored by kevans).
pseudofs: defer initialization until first mount
Thu, Sep 4, 2:11 AM
kevans closed D52156: pseudofs: defer initialization until first mount.
Thu, Sep 4, 2:10 AM
kevans committed rGb9746f6185c7: pseudofs: don't leak the unrhdr on error (authored by kevans).
pseudofs: don't leak the unrhdr on error
Thu, Sep 4, 2:10 AM
kevans closed D52155: pseudofs: don't leak the unrhdr on error.
Thu, Sep 4, 2:10 AM
kevans committed rGcc70c7989bfb: linsysfs: error check device-directory creation (authored by kevans).
linsysfs: error check device-directory creation
Thu, Sep 4, 2:10 AM
kevans closed D52038: linsysfs: error check device-directory creation.
Thu, Sep 4, 2:10 AM
kevans closed D52037: vfs: handle vfs_init() failures.
Thu, Sep 4, 2:10 AM
kevans committed rG6d33507ff9b8: vfs: handle vfs_init() failures (authored by kevans).
vfs: handle vfs_init() failures
Thu, Sep 4, 2:10 AM
kevans requested review of D52373: stty: add the ability to set the tty drainwait.
Thu, Sep 4, 2:01 AM
kevans requested review of D52372: stty: fetch and print the configured drainwait.
Thu, Sep 4, 2:01 AM

Wed, Sep 3

kevans added a comment to D52350: misc/fortune-mod-mormon: New port.

Attempt to fix everything except constructing the plist in the Makefile.
The Porters Handbook does say it's better to have a pkg-plist so people
can use grep on it.

However, that's an excuse because I couldn't figure it out. I tried:
PLIST_FILES= $MODS:S,^,share/games/fortune/,}.dat (plus the same w/o
appending .dat) based off what I read in archivers/stuffit/Makefile,
but then pkg inf -l only shows the last .dat file?

Wed, Sep 3, 11:30 PM
kevans added a comment to D52350: misc/fortune-mod-mormon: New port.

Also: needs an entry in misc/Makefile to hook it up, please include here as well

Wed, Sep 3, 9:58 PM
kevans added a comment to D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.

TL;DR: Please jump to "Finally going back to the dilemma" below.

This isn't really a fun position to be in.

Yes, that's exactly why I am hesitating, and I'll develop a bit more with some findings.

  • On the other hand, we're conditioning sysadmins to as noted, which is a somewhat contradictory stance but probably also one that we've held for many years.

Yes, as detailed above: The text in setgroups(2), the fact that pw(8) and adduser(8) do not by default add the effective GID into the groups database, the fact that login(1) and su(1) do not either at runtime. All these point towards a practice where the effective GID has never been added into the supplementary groups automatically in FreeBSD.

Finally going back to the dilemma: Should initgroups(3) include the effective GID automatically in the supplementary groups?

  • For
    • Full compatibility with the following open source systems: Linux+glibc, NetBSD, OpenBSD, illumos.
    • As the initial effective GID always stays in the supplementary groups, it can reliably be used as a tag to authorize/deny accesses regardless of effective GID change.
    • No need for the administrator to manually insert each user in its group in the groups database, risking discrepancies between users.
  • Against
    • Breaks with FreeBSD's existing practice from the start.
    • Probably incompatible with Darwin/MacOS.
    • Less fine-grained control on the supplementary groups.
    • We could instead change pw(1) and adduser(1) to add by default some user in its group in the groups database, gaining some of the benefits of the other approach while retaining finer-grained control.
    • setgid executables, or privileged processes executing setgid()/setegid() only do not get rid of the initial user's group (it stays in the supplementary set). Thus, the resulting processes can still access files belonging to that user's group.

If it was not for compatibility, I would have chosen "Against" without hesitation as it leaves more leeway to administrators and we can alleviate inconsistencies issues between users by changing pw(1) and adduser(1). I'm personally not (yet?) convinced that full initgroups(3) compatibility is really compelling.

So, I'm at the moment more inclined to stay with "Against". In practice, I would modify initgroups() to just call setgroups() but omitting the first group returned by getgrouplist() (the one explicitly passed to initgroups()). A possible refinement would be to change pw(8) and adduser(8) to automatically include the user's group from the password database in the groups database, possibly based on some flag/config (command-line, pw.conf, adduser.conf).
Alternatives:

  • Instead, just call setgroups(2) on the whole list returned by getgrouplist(3), that's the "For" alternative above.
  • In addition, call setegid(2) to change the effective GID, this is equivalent to the current patch (which falls under "Against" as well for the dilemma above), basically restoring the previous behavior (before the setgroups(2)/getgroups(2) changes). However, other implementations never set the effective GID. "Portable" programs usually support our idiosyncrasy, but there are bugs sometimes (kevans@ uncovered one recently in OpenSSH).

What do people think?

Wed, Sep 3, 5:06 PM
kevans added a comment to D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.

My dilemma here is that, assuming the docs you recall for admins does exist (I don't recall either way), we have two competing notions of how this works:

Wed, Sep 3, 3:30 AM

Tue, Sep 2

kevans added a comment to D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.

A priori, we have to decide between two alternatives for initgroups(3):

  1. We restore the exact old behavior, which was modified by the setgroups(2)/getgroups(2) changes: The additional group passed to initgroups() is in fact meant to become the effective GID, and those retrieved from the groups database the supplementary groups.
  2. Or we agree with the change of behavior, but then we have to add a new symbol version for initgroups(3) and provide the new implementation in this review as the backwards compatible implementation.
Tue, Sep 2, 9:47 PM
kevans accepted D52317: tty: Retire zombie dtrwait.

How about we cut a deal: if you slap a deprecation on comcontrol is 15.0, I'll look at adding drainwait configuration to stty(1) to replace it. We don't need to maintain a special command to "control a special tty device" for a configuration item that's implemented in the tty layer.

Tue, Sep 2, 8:20 PM
kevans accepted D52316: rc.d/serial: Kill dtrwait.
Tue, Sep 2, 8:14 PM
kevans accepted D52315: rc.d/serial: Remove removed drivers..
Tue, Sep 2, 8:14 PM
kevans added a comment to D50952: kerberos5: Avoid embedding full paths in generated files.

Note that all of these have .ORDER declarations a few lines up that effectively serializes all of the generated targets.

Tue, Sep 2, 7:48 PM

Mon, Sep 1

kevans added inline comments to D52310: ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t *.
Mon, Sep 1, 5:42 PM

Sun, Aug 31

kevans updated the diff for D52295: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.

Revise based on feedback and further consideration

Sun, Aug 31, 10:48 PM
kevans added inline comments to D52244: usb: preserve error when doing request.
Sun, Aug 31, 2:59 PM
kevans added inline comments to D52295: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.
Sun, Aug 31, 4:58 AM

Sat, Aug 30

kevans added a comment to D51837: patch: fix pch_context() for unified diffs with no leading context.
In D51837#1194076, @pfg wrote:

FWIW, just about the best test one can make for a significant patch change is to have an exp-run over the ports tree.

Sat, Aug 30, 11:13 PM
kevans added inline comments to D52295: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.
Sat, Aug 30, 11:09 PM
kevans added a reverting change for rGf97b6a8f84b3: patch: fix pch_context() for unified diffs with no leading context: rGfb37e38fbe99: Revert "patch: fix pch_context() for unified diffs with no leading context".
Sat, Aug 30, 10:04 PM
kevans committed rGfb37e38fbe99: Revert "patch: fix pch_context() for unified diffs with no leading context" (authored by kevans).
Revert "patch: fix pch_context() for unified diffs with no leading context"
Sat, Aug 30, 10:03 PM
kevans added a reverting change for D51837: patch: fix pch_context() for unified diffs with no leading context: rGfb37e38fbe99: Revert "patch: fix pch_context() for unified diffs with no leading context".
Sat, Aug 30, 10:03 PM
kevans requested review of D52295: libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails.
Sat, Aug 30, 6:54 PM
kevans added inline comments to D52294: build: downgrade clock error to a warning for buildenv.
Sat, Aug 30, 5:47 PM
kevans requested review of D52294: build: downgrade clock error to a warning for buildenv.
Sat, Aug 30, 5:46 PM
kevans added inline comments to D52291: Makefile.inc1: Build openssl as a certctl dependency on old FreeBSD.
Sat, Aug 30, 3:39 PM
kevans updated the diff for D52157: pseudofs: return errors from pfs_create_*().

Move the out-node parameter to the second and update the spatch accordingly, and
set *opn up front.

Sat, Aug 30, 3:37 PM

Aug 30 2025

kevans added a comment to D52282: initgroups(3): Add a pre-FreeBSD-15-compatible version.

This was an intentional decision, not an oversight. On every other platform it does exactly what we had previously documented, leaving the egid alone and ensuring the passed-in basegid is added to the supplementary group list.

Aug 30 2025, 12:40 AM

Aug 29 2025

kevans committed rGcc36624b2a8b: patch: test for unified diffs with spaces in filenames (authored by kevans).
patch: test for unified diffs with spaces in filenames
Aug 29 2025, 7:25 PM
kevans committed rGf97b6a8f84b3: patch: fix pch_context() for unified diffs with no leading context (authored by kevans).
patch: fix pch_context() for unified diffs with no leading context
Aug 29 2025, 7:25 PM
kevans closed D51837: patch: fix pch_context() for unified diffs with no leading context.
Aug 29 2025, 7:25 PM
kevans requested review of D52242: make_dev.9: add a note about the device cred usage.
Aug 29 2025, 4:35 PM
kevans updated the diff for D52156: pseudofs: defer initialization until first mount.

Incorporate review feedback

Aug 29 2025, 3:46 AM

Aug 28 2025

kevans added inline comments to D52156: pseudofs: defer initialization until first mount.
Aug 28 2025, 3:38 PM
kevans added a reviewer for D47417: linsysfs: implemented /sys/class/tty: kevans.
Aug 28 2025, 3:04 PM · Linux Emulation

Aug 27 2025

kevans accepted D52181: bsd.man.mk: Handle MANSRC.{TARGET} for MK_MANCOMPRESS=no and empty MANBUILDCAT.

Thanks!

Aug 27 2025, 6:41 PM
kevans accepted D52181: bsd.man.mk: Handle MANSRC.{TARGET} for MK_MANCOMPRESS=no and empty MANBUILDCAT.
Aug 27 2025, 4:00 PM
kevans updated the diff for D52156: pseudofs: defer initialization until first mount.

Take a stab at converting pfs_uninit to last-unmount

Aug 27 2025, 4:44 AM
kevans added inline comments to D52156: pseudofs: defer initialization until first mount.
Aug 27 2025, 3:17 AM
kevans added a comment to D52161: sh: Remove /.profile.

but I don't think I've seen you comment on the reason it is like this: how do you feel about trying to set $HOME in init(8) when we invoke the single-user shell?

I think thats creep of shoving a problem in pkg inability to handle the situation by putting a set of bandaids (removal of /.profile being one, adding setting $HOME to init a second.)

Aug 27 2025, 1:55 AM
kevans added a comment to D52174: Add org.openzfs:raidz_expansion to read-whitelist in ZFS bootloader.
In D52174#1191961, @imp wrote:

So this is an installer bug? We should fail here?

Aug 27 2025, 12:20 AM

Aug 26 2025

kevans added a comment to D52174: Add org.openzfs:raidz_expansion to read-whitelist in ZFS bootloader.

I think the least bad thing as a first step is to allow boot with the raidz_expansion flag set if the zpool is not zraid in the first place. That covers many users.

Aug 26 2025, 11:18 PM
kevans committed rG0d843cc2e2a3: hastd: update assertion for new setgroups/getgroups behavior (authored by kevans).
hastd: update assertion for new setgroups/getgroups behavior
Aug 26 2025, 10:50 PM
kevans added a comment to D52174: Add org.openzfs:raidz_expansion to read-whitelist in ZFS bootloader.

Another can of worms is what I often do, which is prepare a new FreeBSD installation by connecting a new disk as a second disk to an existing install and prepare a root filesystem on the commandline. It will be very hard to prevent me from footshooting in that situation.

Aug 26 2025, 10:39 PM
kevans added a comment to D52174: Add org.openzfs:raidz_expansion to read-whitelist in ZFS bootloader.

zfeature_common.c:759 says that this feature does not fall into the category of readonly-compatible features. That's the list that determines whether a lack of this feature in the running kernel would still allow a readonly mount.

We could also forbid actually expanding a raidz when it is a root filesystem

Aug 26 2025, 10:38 PM
kevans added a comment to D52174: Add org.openzfs:raidz_expansion to read-whitelist in ZFS bootloader.

We chatted a bit and I was pointed to the theory statement in module/zfs/vdev_raidz.c (line ~148). My inclination is that we should actually disable this in the installer-created root pools and warn about it in documentation somewhere. Our read support would Just Work(TM) pre-expansion, but as @cracauer had already suspected there's a period of time in the middle of an expansion where you need to re-math for blocks that haven't been reflowed yet.

Aug 26 2025, 10:25 PM
kevans added a comment to D52174: Add org.openzfs:raidz_expansion to read-whitelist in ZFS bootloader.
In D52174#1191934, @imp wrote:

Linux has a policy of creating root partitions with a tiny subset of the capabilities in it. We should look into updating the installer to do that, but I'm pretty sure it wouldn't have big uptake.

But this change is needed, go ahead.

We remind ZFS users all the time to upgrade their pools (which I don't like). Users would re-introduce excluded features easily.

I am waiting for some ZFS specialist to voice an opinion on whether raidz_expansion is indeed read-neutral.

Aug 26 2025, 9:42 PM
kevans added a comment to D52161: sh: Remove /.profile.

… single user.

Is either .cshrc or .profile intended to be effective in this mode?

I don't see a reason it should not be.

I tried it on my system (the text block above) and confirmed that sh read /root/.profile when booted in single user mode.

I actually can't reproduce that result here. If I remove /.profile and add a SECRETVAR to /root/.profile, it's not populated (and I don't really see where we'd get a $HOME from in init or early /bin/sh)

First to Ed, did you rm /.profile? As if you read the contents you well see that it SETS /home.

To kevans, thanks that confirms that it was /.profile that set home.

Aug 26 2025, 9:29 PM