All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>
To: khorenko@virtuozzo.com, ptikhomirov@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v3 3/6] ve: hide the tasks that set up a starting VE from the rest of it
Date: Wed, 18 Nov 2026 15:32:25 +0400	[thread overview]
Message-ID: <32b696c1-d246-4010-8cfe-8eea0ee63b7f@virtuozzo.com> (raw)
In-Reply-To: <010701a1ee44842b-bd19921e-421e-4ef1-95ed-43e1cceda377-000000@eu-central-1.amazonses.com>


On 11/18/26 2:47 PM, no-reply@sashiko.virtuozzo.com wrote:
> Can a task get the VD_VE_SETUP_TASK mark in a VE that is not pseudosuper? The mark is chosen from ve->state alone, and ve->is_pseudosuper is never checked here.
> 
> ve_pseudosuper_write() only refuses a 0->1 flip when VE_IS_RUNNING(ve) || ve->ve_nsproxy. ve_nsproxy is set only in ve_start_container(), so the host can still set pseudosuper=1 on a STARTING VE that already has tasks. ve_vps_dumpable() reports the mark as VD_PTRACE_COREDUMP only while is_pseudosuper is 0. After the flip, the already-marked tasks become setup tasks again. They are then unreachable from ordinary tasks of the VE and dump no core.
> 
> This also contradicts the ve_vps_dumpable() comment, which says pseudosuper "cannot be set again while @ve runs". Would it be better to require ve->is_pseudosuper when applying the mark? Alternatively, reject the 0->1 flip once the VE has tasks.

I think this one is fine as is. Only the host can set pseudosuper, and 
vzctl sets it before the first task enters the VE (do_env_create()). The 
mark can only be on tasks the host sent into the starting VE, and those 
are the setup tasks, so if the host sets pseudosuper again before START 
they are setup tasks again. A container task never gets the mark.

The ve_vps_dumpable() comment means after START, when 
ve_pseudosuper_write() refuses to set it. "Once @ve has started" would 
say it better, I will change it if there is a v4.

-- 
Best regards, Mirian Shilakadze
Linux C Virtualization Developer, Virtuozzo.

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

  reply	other threads:[~2026-11-18 11:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 10:36 [Devel] [PATCH hci-8.2 v3 0/6] ve: give the pseudosuper privileges only to the tasks setting up a VE Mirian Shilakadze
2026-11-18 10:36 ` [Devel] [PATCH hci-8.2 v3 1/6] ve: tell ve_setup_task() which VE the task comes from Mirian Shilakadze
2026-11-18 10:41   ` no-reply
2026-11-18 10:36 ` [Devel] [PATCH hci-8.2 v3 2/6] ve: hide only the tasks the host sends into a VE Mirian Shilakadze
2026-11-18 10:42   ` no-reply
2026-11-18 10:36 ` [Devel] [PATCH hci-8.2 v3 3/6] ve: hide the tasks that set up a starting VE from the rest of it Mirian Shilakadze
2026-11-18 10:47   ` no-reply
2026-11-18 11:32     ` Mirian Shilakadze [this message]
2026-11-18 10:36 ` [Devel] [PATCH hci-8.2 v3 4/6] cgroup: give the CT root file writes and hidden roots only to setup tasks Mirian Shilakadze
2026-11-18 10:46   ` no-reply
2026-11-18 10:36 ` [Devel] [PATCH hci-8.2 v3 5/6] fs: keep the mount relaxations of a pseudosuper VE from container binaries Mirian Shilakadze
2026-11-18 10:50   ` no-reply
2026-11-18 10:36 ` [Devel] [PATCH hci-8.2 v3 6/6] ve: give the remaining pseudosuper relaxations only to setup tasks Mirian Shilakadze
2026-11-18 10:49   ` no-reply
2026-11-18 11:54 ` [Devel] [PATCH hci-8.2 v3 0/6] ve: give the pseudosuper privileges only to the tasks setting up a VE Vasileios Almpanis
2026-11-18 15:14 ` Konstantin Khorenko
2026-11-18 15:14 ` 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=32b696c1-d246-4010-8cfe-8eea0ee63b7f@virtuozzo.com \
    --to=mirian.shilakadze@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@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.