User Details
- User Since
- Jul 1 2014, 6:02 PM (646 w, 2 d)
Today
I was pondering if there was an engineering practice that let types prevent this error and realized there is. If we'd habitually split these thunks into e.g., void ffe2ffe32(const struct ffclock_estimate*, struct ffclock_estimate32*) and vs versa then const would have been on our side.
Wed, Nov 18
Seems reasonable. I do wonder if there are any side channels related for forced I/O, but I doubt they are interesting vs e.g., things you can do with CPU load.
Tue, Nov 17
Wow, this is a lot of work. In CheriBSD, I suspect this will be quite interesting for our work on co-processes (applications consisting of multiple processes in a single address space). I know @jhb has suggested this might be a better set of interfaces than some of the ones we've developed.
Mon, Nov 16
Seems like a useful thing to have around.
Fri, Nov 13
After I pushed D61464 llm-postcr reanalyzed this file and gave a higher quality report that reflects our conversation.
POSTCR-9506d8e0b1788068cbd4c2cbc984cb6ee0dcb0ab-1: pre-existing: swapoff of a GEOM-backed swap device never releases the devfs vnode reference taken by swapon
Remove comment about swapgeom_close being called by biodone.
Thu, Nov 12
Make it an error if modstat fails with a v2 struct when compat_freebsd13 is present
spelling
Host the vrele out of the swap device lock region
postcr report
POSTCR-965170da4548176cb0ec4ee65e01248af37f8824-2: pre-existing: swapgeom_close() never releases the sw_vp reference that kern_swapon() keeps for GEOM swap devices
postcr report:
POSTCR-965170da4548176cb0ec4ee65e01248af37f8824-1: pre-existing: kern_swapoff() never vrele()s the vnode returned by namei(), leaking a usecount on every call where the lookup succeeds
llm-postcr says:
POSTCR-f20c712f167acd692240350179d4d98d33971375-1: pre-existing:
extattr_list_{fd,file,link} with nbytes > SSIZE_MAX makes uio_resid negative,
which gets past the IOSIZE_MAX check and trips the uiomove() KASSERT (panic
triggerable by an unprivileged user on INVARIANTS kernels)llm-postcr correctly reported that the v1 tests would now fail after 1ebf46ecb627 (thought it didn't realize they would pass on armv7 and powerpc). It also didn't report that v2 tests would fail on a kernel without COMPAT_FREEBSD13. I've update both to allow support to not be present.
Wed, Nov 11
freebsd32_modstat: Don't unlock twice, do free statbuf
Thanks for the review. That error I made probably argues for further consolidation, but I'll hold off for the moment.
The second LLM review convinced me to fix this more properly.
Tue, Nov 10
- Handle freebsd32_modstat
- Use the same pattern for the lookup failure
use goto out pattern
