The "panic: iwx_init_fw_sec" panic happens because iwx_resume() calls iwx_init_hw(), but doesn't set IWX_FLAG_HW_INITED, so later when iwx_parent() runs it calls iwx_init() again. If I comment out all of iwx_resume(), I can do "netif stop", then suspend, resume, then "netif start" and that makes WiFi work again \o/
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Apr 14 2025
If I do "doas /etc/rc.d/netif stop" before suspending, it survives the resume, but trying to "netif start" afterwards results in either a hard wedge, or:
Okay, so, with this applied on top of D49759, resuming with wlan0 configured and up results in:
Dec 18 2024
Note that I have plans to cull some more bits off deadfs, but the remaining bits contain some tiny differences, so I want to address them separately.
Dec 16 2024
Dec 9 2024
Note that for now this requires new schema files, to be found at:
Nov 29 2024
Nov 28 2024
Nov 26 2024
Nov 18 2024
More fixes from wulf@
Nov 17 2024
Okay, so turns out this is the REL_WHEEL, not REL_HWHEEL;
its just that all the offsets within the report are shifted
by one byte. I'm guessing this is the Report ID.
Fixes suggested by wulf@.
Nov 16 2024
Nov 13 2024
Nov 7 2024
Get rid of vhold/vdrop. I've been running it for a few days
and it appears to work fine.
Nov 4 2024
In D47391#1080971, @kib wrote:This cannot be right.
If the file references vnode, vnode must be active and have the use count at least 1, because file vref-ed the vnode on open.
Second try.
Nov 1 2024
This follows a somewhat similar fix in https://reviews.freebsd.org/D29323?id=86801. I can't say I have a proper understanding of what's going on here though.
Oct 23 2024
Oct 22 2024
In D44373#1076563, @markj wrote:In D44373#1076525, @trasz wrote:In D44373#1074357, @markj wrote:In D44373#1074343, @trasz wrote:In D44373#1072417, @markj wrote:Reading the proposal, I sense that this would make capsicumization of command-line programs which convert argv[] entries to capabilities (i.e., which process a list of files) much easier. Rather than having to use cap_fileargs (which is expensive and has some functional thorns, and requires some refactoring to pass the casper channel around) or refactor everything to use openat() (not always practical), the program can instead
- open the root dir and working dir,
- limit rights on those dir fds,
- call cap_enter()
- call fchdir() and fchroot() with the aforementioned dirfds
Then, the program should be able to process argv[] entries without any further modification, which would make life much easier. This leaves open the possibility that the sandboxed process would be able to open files not listed in the argv[], but assuming that rights are appropriately limited on the dirfds, I think this is probably an acceptable tradeoff for many programs.
It would be quite nice if one could do this without requiring privileges. In particular, if one is just using fchroot() to make a dirfd visible to capsicum without actually changing the root directory (i.e., the root vnode doesn't change), can we get away without requiring that?
That's precisely the idea - and it explains it much better than my description above. And yes, fchroot(2) can be used unprivileged same way chroot(2) can, just set PROC_NO_NEW_PRIVS_ENABLE; for now you also need to set security.bsd.unprivileged_chroot=1.
Indeed, but if we start sandboxing command-line applications this way, they'll presumably be broken if someone sets security.bsd.unprivileged_chroot=0, which seems rather fragile. So, I'm wondering if calling fchroot() without actually changing the root vnode can be a special operation which doesn't require privilege checking.
Not sure if I follow. How would fchroot(2) work without changing the root vnode?
In the use-case I imagined originally, code would effectively do this:
dfd = open("/", O_DIRECTORY); cap_rights_limit(dfd, ...) cap_enter(); fchroot(dfd); /* now applications can use open("/foo/bar"), subject to rights on `dfd`. */Here, the root vnode isn't actually changing.
Oct 21 2024
In D44373#1074357, @markj wrote:In D44373#1074343, @trasz wrote:In D44373#1072417, @markj wrote:Reading the proposal, I sense that this would make capsicumization of command-line programs which convert argv[] entries to capabilities (i.e., which process a list of files) much easier. Rather than having to use cap_fileargs (which is expensive and has some functional thorns, and requires some refactoring to pass the casper channel around) or refactor everything to use openat() (not always practical), the program can instead
- open the root dir and working dir,
- limit rights on those dir fds,
- call cap_enter()
- call fchdir() and fchroot() with the aforementioned dirfds
Then, the program should be able to process argv[] entries without any further modification, which would make life much easier. This leaves open the possibility that the sandboxed process would be able to open files not listed in the argv[], but assuming that rights are appropriately limited on the dirfds, I think this is probably an acceptable tradeoff for many programs.
It would be quite nice if one could do this without requiring privileges. In particular, if one is just using fchroot() to make a dirfd visible to capsicum without actually changing the root directory (i.e., the root vnode doesn't change), can we get away without requiring that?
That's precisely the idea - and it explains it much better than my description above. And yes, fchroot(2) can be used unprivileged same way chroot(2) can, just set PROC_NO_NEW_PRIVS_ENABLE; for now you also need to set security.bsd.unprivileged_chroot=1.
Indeed, but if we start sandboxing command-line applications this way, they'll presumably be broken if someone sets security.bsd.unprivileged_chroot=0, which seems rather fragile. So, I'm wondering if calling fchroot() without actually changing the root vnode can be a special operation which doesn't require privilege checking.
Oct 15 2024
In D44373#1072417, @markj wrote:Reading the proposal, I sense that this would make capsicumization of command-line programs which convert argv[] entries to capabilities (i.e., which process a list of files) much easier. Rather than having to use cap_fileargs (which is expensive and has some functional thorns, and requires some refactoring to pass the casper channel around) or refactor everything to use openat() (not always practical), the program can instead
- open the root dir and working dir,
- limit rights on those dir fds,
- call cap_enter()
- call fchdir() and fchroot() with the aforementioned dirfds
Then, the program should be able to process argv[] entries without any further modification, which would make life much easier. This leaves open the possibility that the sandboxed process would be able to open files not listed in the argv[], but assuming that rights are appropriately limited on the dirfds, I think this is probably an acceptable tradeoff for many programs.
It would be quite nice if one could do this without requiring privileges. In particular, if one is just using fchroot() to make a dirfd visible to capsicum without actually changing the root directory (i.e., the root vnode doesn't change), can we get away without requiring that?
Oct 9 2024
Oct 4 2024
Two more nits from salvadore@
Oct 2 2024
In D46710#1068643, @kib wrote:In D46710#1067824, @trasz wrote:In D46710#1067752, @kib wrote:In D46710#1067690, @trasz wrote:I think the way it works is that autofs_lookup() doesn't trigger when looking up the autofs directory itself, only when looking up inside that directory?
I do not think so. When lookup finds a mount point, it steps over it. So I do think that this is due to caching.
It's not (typically) a mountpoint though? Usually you'd have something like /net/server/share/; the /net is the autofs mount point, and /net/server/ is an ordinary synthetic autofs directory, not a mount point. And this is about looking up /net/server/share - a stat(2) on that shouldn't trigger mounting it.
Right. And what does prevent the autofs_lookup() from triggering the mount in this situation? It should, unless the vnode is present in namecache.
Oct 1 2024
copyedits, one line per sentence.
Sep 29 2024
In D46710#1067752, @kib wrote:In D46710#1067690, @trasz wrote:I think the way it works is that autofs_lookup() doesn't trigger when looking up the autofs directory itself, only when looking up inside that directory?
I do not think so. When lookup finds a mount point, it steps over it. So I do think that this is due to caching.
Sep 28 2024
I think the way it works is that autofs_lookup() doesn't trigger when looking up the autofs directory itself, only when looking up inside that directory?
Sep 27 2024
Sep 24 2024
Sep 23 2024
In D46710#1065280, @kib wrote:In D46710#1065252, @trasz wrote:Iâm not sure I follow, but FreeBSD doesnât mount on stat anyway, so why introduce the native flag instead of making the code consistently ignore the Linux one? Linux autofs semantics is broken in some interesting ways; we donât need to port functionality that only exists to work around that brokenness.
Could you please explain how do we avoid triggering automount on stat? The autofs_mount_on_stat knob is mostly nop because the trigger happen during lookup preceeding the call to VOP_GETATTR().
Sep 21 2024
Iâm not sure I follow, but FreeBSD doesnât mount on stat anyway, so why introduce the native flag instead of making the code consistently ignore the Linux one? Linux autofs semantics is broken in some interesting ways; we donât need to port functionality that only exists to work around that brokenness.
Sep 13 2024
Aug 28 2024
So... how do we proceed with this?
Jul 23 2024
Drop wait6(2) for now
Jul 15 2024
Jun 18 2024
Man page rewording from gnn@
May 27 2024
May 21 2024
In D44373#1032959, @jonathan wrote:@trasz : thanks for sending this review request. My general feeling is that I'm leery of relaxing the in-kernel security model, not just because of the potential for opening things we don't mean to open, but also because it complicates the model for those who are trying to understand it. "No global namespaces", while limiting, is a clearer rule than "no global namespaces unless you or your ancestor has previously called fchroot(2), unless-unless something has also called cap_enter(2) again to clear that magic vnode".
May 18 2024
(And also an earlier version of this did exactly that wrt idtype, thatâs why the title still mentions the âlimited subsetâ; only after that Iâve discovered that you canât wait for arbitrary PIDs anyway.)
I might be wrong, but isnât this restriction already there, inherent to wait(2) APIs? You need to use kqueue to wait for non-children?
May 14 2024
Sigh, a typo.
Man page fix from Brooks.
May 13 2024
May 2 2024
Use the right symbol version and bump Dd.
May 1 2024
There's a separate review for vfork (https://reviews.freebsd.org/D39829). And yeah, I've pasted Robert the link to this one here :)
Add back procstat(1) bits and remove syscalls.map
As for CAP_FCHROOT - I think we should have it, if only for symmetry with CAP_FCHDIR. I don't really want to implement them - the lookup code isn't really suited for tracking rights for root and cwd, and so those two syscalls require full rights to succeed, not just a subset - but we could in the future.