• Christian Brauner's avatar
    fs: add mount_setattr() · 2a186721
    Christian Brauner authored
    This implements the missing mount_setattr() syscall. While the new mount
    api allows to change the properties of a superblock there is currently
    no way to change the properties of a mount or a mount tree using file
    descriptors which the new mount api is based on. In addition the old
    mount api has the restriction that mount options cannot be applied
    recursively. This hasn't changed since changing mount options on a
    per-mount basis was implemented in [1] and has been a frequent request
    not just for convenience but also for security reasons. The legacy
    mount syscall is unable to accommodate this behavior without introducing
    a whole new set of flags because MS_REC | MS_REMOUNT | MS_BIND |
    MS_RDONLY | MS_NOEXEC | [...] only apply the mount option to the topmost
    mount. Changing MS_REC to apply to the whole mount tree would mean
    introducing a significant uapi change and would likely cause significant
    regressions.
    
    The new mount_setattr() syscall allows to recursively clear and set
    mount op...
    2a186721
syscall.tbl 21.8 KB