Try to open the control device read-write first, and fall back to
read-only if that fails and the error is EACCES.
MFC after: 1 week
Event: EuroBSDCon 2026 DevSummit
Differential D59592
libgeom: Open the control device read-write Authored by des on Fri, Sep 11, 2:51 PM.
Details
Diff Detail
Event TimelineComment Actions The only concern I have with the kernel enforcing write is what happens if we boot old binary, new kernel (which is quite typical). Would we have situations where we can't configure the system enough to build/install a new binary. Comment Actions We could add some logic in g_ctl_ioctl() that sets FWRITE if the caller is the superuser, and then remove it in a year or two? Or make it conditional on COMPAT_FREEBSD15? |