-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow null pointer as mount syscall options #3771
Comments
@bjin this was done intentionally to ensure certain hints were passed via mount options to the kernel via the mount helper. Assuming NULL was invalid was a convenient way to simplify the code. I didn't expect this to be an issue because I wasn't aware of any applications which bypassed |
@behlendorf, The following 2 points in moby/moby/issues/16258 should be of interest. @Mic92 mentions that:
@bjin referenced the following snippet from https://github.com/golang/sys/blob/master/unix/syscall_linux.go#L821
|
mount.zfs could be an option, since it supports selinux. |
Passing NULL for the mount data should not result in EINVAL. It should be treated as if an empty string were passed and succeed. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#3771
The bug here has been addressed in 0.6.5.1. But just so you're aware you can pass selinux contexts as a mount option using
|
Passing NULL for the mount data should not result in EINVAL. It should be treated as if an empty string were passed and succeed. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ned Bass <bass6@llnl.gov> Issue #3771
I find that
docker
is not working properly withzfs 0.6.5
(See moby/moby#16258). The docker daemon log shows thatmount
failed withEINVAL
for a newly createdmountpoint=legacy
dataset.I write two simple program in
C
andGo
, and it turns out that whilemount("zroot/test", "/tmp/test", "zfs", 0, "")
would succeed,mount("zroot/test", "/tmp/test", "zfs", 0, NULL)
will triggerEINTVAL
. Thesyscall
Go package seems to prefer null pointer as mount options.Additional tracing lead me to 0282c41, in
zpl_parse_options()
. What do you think of the idea to allow nullmntopts
here?The text was updated successfully, but these errors were encountered: