Page MenuHomeFreeBSD

libgeom: Open the control device read-write
AcceptedPublic

Authored by des on Fri, Sep 11, 2:51 PM.

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76777
Build 73660: arc lint + arc unit

Event Timeline

des requested review of this revision.Fri, Sep 11, 2:51 PM

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.

This revision is now accepted and ready to land.Fri, Sep 11, 4:36 PM
In D59592#1367478, @imp wrote:

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.

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?