Page MenuHomeFreeBSD

Enter a write sequence when updating rights.
ClosedPublic

Authored by markj on Wed, Mar 18, 9:32 PM.

Details

Summary

The Capsicum system calls modify file descriptor table entries. To
ensure that readers observe a consistent snapshot of descriptor writes,
the system calls need to signal to unlocked readers that an update is
pending. This is particularly true on systems that do not write 64-bit
values atomically.

Note that ioctl rights are always checked with the descriptor table lock
held, so it is not strictly necessary to signal unlocked readers.
However, we probably want to enable lockless ioctl checks eventually, so
use seqc_write_begin() in kern_cap_ioctls_limit() too.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Wed, Mar 18, 9:32 PM
markj edited the summary of this revision. (Show Details)Wed, Mar 18, 10:22 PM
markj added reviewers: kib, mjg.
kib accepted this revision.Wed, Mar 18, 11:49 PM
This revision is now accepted and ready to land.Wed, Mar 18, 11:49 PM
This revision was automatically updated to reflect the committed changes.