All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>,
	khorenko@virtuozzo.com, ptikhomirov@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 5/6] fs: keep the mount relaxations of a pseudosuper VE from container binaries
Date: Tue, 17 Nov 2026 10:33:01 +0000	[thread overview]
Message-ID: <010701a1e91136c8-cc99ee77-a51b-4c13-b931-bbd498fc8de7-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261117101329.225854-6-mirian.shilakadze@virtuozzo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ve: stale comment and redundant ve_is_super() in
  ve_try_reserve_mount()
--

commit d4e71dc38fde8afad24f03dceda38eb1041883d9
Author: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>

fs: keep the mount relaxations of a pseudosuper VE from container binaries

The commit limits the device mount option filter relaxation to setup tasks of a pseudosuper VE. It limits the VE mount limit relaxation to setup tasks and to host tasks that joined the VE after it started. It adds ve_current_is_host_task() to identify the second kind of task.

> diff --git a/fs/namespace.c b/fs/namespace.c
> index d622d9b72d32..fd6ef93ed403 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c

[ ... ]

> @@ -3367,7 +3367,7 @@ int ve_devmnt_verify(struct ve_struct *ve, dev_t dev, char *opts, bool new_mount
>  
>  static inline int ve_try_reserve_mount(struct ve_struct *ve)
>  {
> -	int ret = ve_is_super(ve) || ve->is_pseudosuper ||
> +	int ret = ve_is_super(ve) || ve_current_is_host_task(ve) ||
>  		  ve_is_super(get_exec_env());
>  	/* Ignore limits in ve0 and pseudosuper cases, but still count. */
>  	if (ret)

[Severity: Low]
This isn't a bug, but the comment below the condition still says limits are ignored in "pseudosuper cases". Now only setup tasks and late-joining host tasks of a pseudosuper VE skip the limit, so the comment describes the old behaviour. Could it be updated?

Also, ve_current_is_host_task() already returns true for ve0 through ve_current_is_pseudosuper(). The leading ve_is_super(ve) term is therefore redundant and can be dropped.

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261117101329.225854-1-mirian.shilakadze@virtuozzo.com?part=5

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-17 10:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 10:13 [Devel] [PATCH hci-8.2 v2 0/6] ve: give the pseudosuper privileges only to the tasks setting up a VE Mirian Shilakadze
2026-11-17 10:13 ` [Devel] [PATCH hci-8.2 v2 1/6] ve: tell ve_setup_task() which VE the task comes from Mirian Shilakadze
2026-11-17 10:20   ` no-reply
2026-11-17 10:13 ` [Devel] [PATCH hci-8.2 v2 2/6] ve: hide only the tasks the host sends into a VE Mirian Shilakadze
2026-11-17 10:22   ` no-reply
2026-11-17 10:13 ` [Devel] [PATCH hci-8.2 v2 3/6] ve: hide the tasks that set up a starting VE from the rest of it Mirian Shilakadze
2026-11-17 10:27   ` no-reply
2026-11-17 11:40   ` Konstantin Khorenko
2026-11-17 10:13 ` [Devel] [PATCH hci-8.2 v2 4/6] cgroup: give the CT root file writes and hidden roots only to setup tasks Mirian Shilakadze
2026-11-17 10:30   ` no-reply
2026-11-17 10:13 ` [Devel] [PATCH hci-8.2 v2 5/6] fs: keep the mount relaxations of a pseudosuper VE from container binaries Mirian Shilakadze
2026-11-17 10:33   ` no-reply [this message]
2026-11-17 11:40   ` Konstantin Khorenko
2026-11-17 10:13 ` [Devel] [PATCH hci-8.2 v2 6/6] ve: give the remaining pseudosuper relaxations only to setup tasks Mirian Shilakadze
2026-11-17 10:35   ` no-reply
2026-11-17 11:40 ` [Devel] [PATCH hci-8.2 v2 0/6] ve: give the pseudosuper privileges only to the tasks setting up a VE 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=010701a1e91136c8-cc99ee77-a51b-4c13-b931-bbd498fc8de7-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    --cc=mirian.shilakadze@virtuozzo.com \
    --cc=ptikhomirov@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.