[Devel] [PATCH vz10 0/6] ve: give the pseudosuper privileges only to the tasks setting up a VE

Mirian Shilakadze mirian.shilakadze at virtuozzo.com
Tue Nov 17 13:21:00 MSK 2026



On 11/16/26 9:17 PM, Konstantin Khorenko wrote:
> 
> 1. Patch 2 (and 3), code: a host task that moves from a starting VE
>     straight into a running one keeps VD_VE_SETUP_TASK and is visible
>     there. Keep it hidden, as it was before the series. Do not key
>     this on the mm mark alone: CRIU-restored processes keep
>     VD_VE_SETUP_TASK for life.
> 
> 2. Patch 2, commit message: say why a container task must not get
>     VD_VE_ENTER_TASK, and that a task entering its nested VE is no
>     longer hidden there.
> 
> 3. Patch 3, comments: the VD_VE_SETUP_TASK comment in mm_types.h says
>     setup tasks are the only ones with the pseudosuper relaxations,
>     which patch 5 makes untrue; the ve_current_is_pseudosuper()
>     kernel-doc leaves out that it is true for ve0.
> 
> 4. Patch 4, comment: the comment above ve_pseudosuper_write() still
>     says dropping pseudosuper is allowed from any context.
> 
> 5. Patch 5: do what Sashiko asked (the subject says "only to setup
>     tasks" while the mount limit also lets VD_VE_ENTER_TASK through;
>     a helper next to ve_current_is_pseudosuper() instead of the
>     open-coded host_entered), and update the "In case of
>     @is_pseudosuper set" comment in ve_devmnt_process().
> 
> 6. Patch 6, comment: devcgroup_legacy_check_permission() still says
>     everything is allowed in pseudosuper state.
> 
> 7. Cover letter: "vzctl and CRIU need no change, the vzctl start path
>     was already fixed under VSTOR-151174" is two sentences glued with a
>     comma, and the series also works with older libvzctl. Say what
>     VSTOR-151174 changed or drop the clause. Put blank lines around the
>     "- 1/6" list.

Thanks, all seven are fixed in v2, on hci-8.2.

For item 1, a setup task that leaves a VE while it is still pseudosuper 
now counts as sent by the host, so a host task moving from a starting VE 
into a running one is hidden there again. A restored process does not 
count, as its VE is no longer pseudosuper by then.

I also fixed two more things I found while reworking it: ve_setup_task() 
now runs before the old VE namespace is put, since that may drop the 
last reference to it, and a task that setns()es into its own VE keeps 
its mark.

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



More information about the Devel mailing list