Page MenuHomeFreeBSD

devctl: don't publish the mount options
ClosedPublic

Authored by imp on Jul 23 2021, 3:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 13 2024, 5:53 AM
Unknown Object (File)
Dec 23 2023, 3:45 AM
Unknown Object (File)
Dec 15 2023, 5:26 PM
Unknown Object (File)
Dec 14 2023, 9:58 PM
Unknown Object (File)
Oct 30 2023, 11:30 AM
Unknown Object (File)
Aug 28 2023, 10:00 PM
Unknown Object (File)
Aug 16 2023, 8:50 AM
Unknown Object (File)
Jul 16 2023, 8:23 PM
Subscribers
None

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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40651
Build 37540: arc lint + arc unit

Event Timeline

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

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.