From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH vz10 v2 3/3] selftests/ve: test locking a mount from the host
Date: Mon, 16 Nov 2026 18:13:33 +0100 [thread overview]
Message-ID: <179484921366.861498.1846806750783027661.b4-review@b4> (raw)
In-Reply-To: <20261116061256.54472-4-mirian.shilakadze@virtuozzo.com>
I won't apply this version, please send v3 with the changes below.
On Mon, 16 Nov 2026 10:12:54 +0400, Mirian Shilakadze <mirian.shilakadze@virtuozzo.com> wrote:
> +TEST_F(lock, not_recursive)
> +{
> + ASSERT_EQ(0, mount(SRC, DST, NULL, MS_BIND, NULL));
> + ASSERT_EQ(-1, setattr(AT_FDCWD, DST, AT_RECURSIVE,
> + MOUNT_ATTR_VE_LOCK, 0));
> + EXPECT_EQ(EINVAL, errno);
> +}
Items 1-3 of the cover letter reply:
- Lock DST without AT_RECURSIVE first and expect 0.
- Skip when not root, without user namespaces, or when the kernel
lacks the lock bits.
- Check that statmount() reports the locks lock_mnt_tree() raised.
A kernel without the feature fails this test with EINVAL too, the
unknown bits are refused before AT_RECURSIVE is looked at. That is one
of the two tests the cover letter counts as passing on the stock
kernel.
FIXTURE_SETUP(lock) only asserts, so a run without root fails in
unshare(CLONE_NEWNS), and in_ct() turns a missing user namespace or
missing feature into a failure. The sibling ve tests SKIP when
geteuid() is not 0.
Patch 2 says statmount() reports kernel-raised locks as well; a mount
copied into a new user and mount namespace shows them, and no test
looks at it.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-16 17:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 6:12 [Devel] [PATCH vz10 v2 0/3] fs: let the host lock the protection flags of a mount Mirian Shilakadze
2026-11-16 6:12 ` [Devel] [PATCH vz10 v2 1/3] fs: let the protection flags of a mount be locked from userspace Mirian Shilakadze
2026-11-16 6:24 ` no-reply
2026-11-16 17:13 ` Konstantin Khorenko
2026-11-16 6:12 ` [Devel] [PATCH vz10 v2 2/3] fs: report the locks of a mount in statmount() Mirian Shilakadze
2026-11-16 6:17 ` no-reply
2026-11-16 17:13 ` Konstantin Khorenko
2026-11-16 6:12 ` [Devel] [PATCH vz10 v2 3/3] selftests/ve: test locking a mount from the host Mirian Shilakadze
2026-11-16 6:38 ` no-reply
2026-11-16 17:13 ` Konstantin Khorenko [this message]
2026-11-16 17:13 ` [Devel] [PATCH vz10 v2 0/3] fs: let the host lock the protection flags of a mount Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179484921366.861498.1846806750783027661.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=mirian.shilakadze@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.