nullfs: add nounp_bypass mount option The option, when set, disables bypassing the unix socket vnode down to the lower mp, effectively preventing connection to nullfs unix socket from being acceptable from the lower mp (and vice versa). This is done by providing a vop vector that stops bypass for unp-related VOPs. I believe that VFS_VOP_VECTOR_REGISTER() does the right thing there regardless of the order of initialization. nullfs_mount: use symbols instead of string literals for cache mount options nullfs: add helper testing for vnode belonging to nullfs mount fs/nullfs/null.h: put first definition after headers include
Details
- Reviewers
markj - Commits
- rG033587a985a4: mount_nullfs.8: document unixbypass and nounixbypass
rG6fa205a6233f: nullfs: add nounixbypass mount option
rG8e6f6a5fbde7: nullfs_mount: use symbols instead of string literals for cache mount options
rG419f2fe6b70b: nullfs: add a helper for testing if vnode belongs to a nullfs mount
rG035f1971ade4: fs/nullfs/null.h: put first definition after headers include
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This should be documented in mount_nullfs.8. The implementation looks ok to me.
The name sounds a bit strange to me. The mount_nullfs terminology explains what "bypass" means, but it's still a bit unclear IMO. What do you think about unix_private, nounix_private?
I will after the patch is finalized.
The name sounds a bit strange to me. The mount_nullfs terminology explains what "bypass" means, but it's still a bit unclear IMO. What do you think about unix_private, nounix_private?
For me, 'private' is worse. What exactly is the scope where the socket becomes private? People would think about jails or whatever namespace restriction they intend, but not the pass from upper to lower.
I can rename user-visible option to unixbypass e.g.
sys/fs/nullfs/null.h | ||
---|---|---|
42 | Internally the VOPs are called VOP_UNP_something, so I am consistent I think. |
sys/fs/nullfs/null.h | ||
---|---|---|
42 | I can change if you insist, but unp is the established name in the kernel sources. |