Page MenuHomeFreeBSD

devctl: don't publish the mount options
ClosedPublic

Authored by imp on Jul 23 2021, 3:46 PM.

Details

Summary

Mount options aren't solely ASCII strings. In addition, experience to
date suggests that the mount options are much less useful than was
originally supposed and the mount flags suffice to make decisions. Drop
the reporting of options for the mount/remount/unmount events.

Found by: KASAN / markj
Sponsored by: Netflix

Diff Detail

Repository
R10 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

imp requested review of this revision.Jul 23 2021, 3:46 PM
imp created this revision.
sys/kern/vfs_mount.c
2562

Maybe use the entries from global_opts[]?

imp retitled this revision from devctl: only publish the values of known options to devctl: don't publish the mount options.Jul 23 2021, 8:05 PM
imp edited the summary of this revision. (Show Details)

update, per IRC conversation, to simply not publish the option list.

I think this is ok. An interested consumer could fetch some of the options with statfs(). There is a window between the devctl event and a statfs() call where the mount options could change, but in that case you'd get another event.

sys/kern/vfs_mount.c
2611

A comment explaining why we don't publish mount options would be good to have, IMO.

This revision is now accepted and ready to land.Jul 24 2021, 2:13 PM
This revision was automatically updated to reflect the committed changes.