[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 mirian.shilakadze at virtuozzo.com
Wed Nov 18 14:32:25 MSK 2026


On 11/18/26 2:47 PM, no-reply at 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.



More information about the Devel mailing list