I won't apply this version, please send v3 with the changes below.

On Mon, 16 Nov 2026 10:12:52 +0400, Mirian Shilakadze 
<[email protected]> wrote:
> +     kattr->lock_flags = (attr->attr_set | attr->attr_clr) &
> +                         MOUNT_SETATTR_LOCK_FLAGS;
> +     if (kattr->lock_flags && !capable(CAP_SYS_ADMIN))
> +             return -EPERM;
> +     if (attr->attr_clr & MOUNT_ATTR_VE_LOCK)
> +             return -EINVAL;
> +     if (kattr->lock_flags && kattr->recurse)
> +             return -EINVAL;

Item 5 of the cover letter reply: give the reasons for the two choices
here in the message.

- The ve0 test: in the v1 review I asked to keep it. Dropping it is
  fine now that a lock cannot be dropped: host root that joined a
  container's ve can only add restrictions. One sentence says so.
- AT_RECURSIVE: only the s_umount of this mount's superblock is held,
  submounts on other superblocks would reopen the remount race.

Sashiko's point that a lock bit on an unset protection returns 0 and
locks nothing needs no change: the message and the UAPI comment say a
lock stands only where its protection is set, and MOUNT_ATTR_VE_LOCK
relies on that to lock whatever is set.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to