From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 98A9F80031 for ; Thu, 19 Nov 2026 21:50:29 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AJLnBNt012795; Fri, 20 Nov 2026 00:49:12 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJLnBNt012795 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="I/+y05BF" Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AJLn9Nf012777 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Fri, 20 Nov 2026 00:49:10 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJLn9Nf012777 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-6b706aec674so205282a12.2 for ; Thu, 19 Nov 2026 13:49:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErH1NItBWaeTCLDBe4YFqOXeOGMkzS5lPzQgP5FAgHsa13z/FMYZ2/ObaJZhtPZDrq75vrKOmQ==@openvz.org X-Gm-Message-State: APuU4Z+p+VYGZU2Ogc0/3LVSd1J+12H4iIThP9AuVubkt8W8z5KGyRWa v6f6V/dV3/mHxvKHXpkUeI00cD64CDZRUmb7EGHZTUDQCnjgX1wqjYZR/hfzeklK3lRezZuON4n yypXLC7ATiIi+vezBp+/ulqoFvbVS1EUzEBl/lUHzPwNmvytNiCpTbw== X-Gm-Gg: AYBFou2RF7UN1iLmEpimssj4YEqXGNpBPCxcZv3GWRAbNBq0M+cRd3TuOLvnNSTk/MK cFH4mhZBmR+Ta2+EoYERNDD/J6cB3uP2M4oHjRQdcNl9vJmN6LDTRHiY1LCKZO+2ZfEhpXy/w23 34z3CsxgvXKnPDAPNrbtDQzXV4QHdQNfw9ud29nR64ssdCMmjc+76VGDgt9cavxsRTjEkb1OhcV l0DYUcjEADwhGzVG7ncu15n2AHNaomcdJlVM3oZqCPQDv1nVEVSZyQr1b/Pi6OqxQCfudoE7I+R PMOXzRJb/yGuMmsQrWx5UUn3HW0QmjyV4BTArctbDe/dddgF6W0ElvI0ghAl+KVQezTDfccCDFN gX8yfbl7mDOSygSgqOw== X-Received: by 2002:a05:6402:46d3:b0:6b6:f429:4802 with SMTP id 4fb4d7f45d1cf-6ba37ea3508mr415999a12.25.1795124949689; Thu, 19 Nov 2026 13:49:09 -0800 (PST) X-Received: by 2002:a05:6402:46d3:b0:6b6:f429:4802 with SMTP id 4fb4d7f45d1cf-6ba37ea3508mr415996a12.25.1795124949293; Thu, 19 Nov 2026 13:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795124949; cv=none; d=google.com; s=arc-20260327; b=GMqjvZvCfz/y3cECE2ukFoPl0X6aMk/JqsC6832IWDdvtZ/3aBNCM7qUX2y2ydv3Si waOwV8/D83ZE3iANtuT30uqIrCeZ9tMaEgJP7iVmRVs1UJL9eUwTUUKmyn0T3wN32A09 OvTmX1e+c9SkmdeTWXKVCIiwpyfFCSkazrGsVt2nkRmd0IAaqDHrvPBTeVbFx33sP2y3 WDcISfxR3mbxqCDCrAOgKbNmq3yQWbYPFoWUEhhP1nn12Lvw2qfxRB9StRuIQsmS1OtB oGLaduMYoAwQVxfZyYHoy16S+140RETTCtkDvUJTeRwQo+fkjSrB1Hsl2HyQqfQ7rVik 7MTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:dkim-signature; bh=2yQ2lz5Ocha0R21Hwrj/FuNp+tybRYKJPSANGwboJ0w=; fh=xqcbrIOv/j1NC9DwWL7cs9wu5dYsNcrfZRJG6Y55lVA=; b=PeEVvwUfJrq3FYg1IHn81uM5w6gxS0VXGdD1D4Ats9Z25h5w9Zc2In33qX5Wj7R3cw W3k0bCjCPDuVkAQ7T19cHVkV3gmsGl0253mCkPU+kU1QcmV84iHVSGEcYsv9jPD5t1n3 x4B5FfMSEBL6SaIjrQ3fdLXfsgvdwouZqaFW8Gt+UdYHqCjthjyzvDGIwz10V+85c3PN HgVgRSIAQwTRiShZuLwDVpfx5b0u0JZvXTttMbYfNGPyu8W4AM1pPu5jz9gzyn6xUQGM 83aKHxkyQ3Uv9xgV3v6SH7NPI3dLttyG1dz8aC942jeSu0NI0AozvMSg8TGxH/wLpBZd eODw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b="I/+y05BF"; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-6ba371755a4si720411a12.103.2026.11.19.13.49.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 13:49:09 -0800 (PST) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b="I/+y05BF"; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Message-Id:Date:Subject :From; bh=2yQ2lz5Ocha0R21Hwrj/FuNp+tybRYKJPSANGwboJ0w=; b=I/+y05BFgamoFUIMl66 +tHDtL8oyRO5hrQKcDRuWo8HMlpIVI0Xg7gRMuO2DqLspQ1pbnCFE/ebTrQVf2SUGAAu18cjhO+C1 XnLgUI3KmeVkiIGoYTyaEGG6A4sli5+9RvJk6R//LXN1If9MrDCuPnYP/DU1WSA0TmbKX3Aqq/zUB ms+g0G9xj0ude7+091VvCOThcwIEnHg1bco75ezEZduYStClMZMfUTLdQYAxOoHTH+08j2sasGckz 1QBx2zYBb+O9d+ezMK7IG5v2/ye3nkCPo9PJGduXNMjU+jRp2SNuzed8NH+1fHhKMG/BX7fonqWPH Ow2cu1ZJFB6h3wA==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xUA0A-006nPs-0C; Thu, 19 Nov 2026 22:49:06 +0100 From: Konstantin Khorenko Date: Thu, 19 Nov 2026 22:49:01 +0100 Message-Id: <20261119-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-v1-0-06fa0b8994a8@virtuozzo.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAM1u/2oC/yWNwW7CMBBEfwXtuWuyLri0VyQ+gCvqwXYWbCLFl jexIhD/Xqcc37zRzBOES2SBn80TCtcoMY0N6GMDPtjxxhj7xqA7bYjoG90Oc+GMQ0iFxyFhlSk VpL0hs8PKKDzNGScrA2bhuU8yZy7IRP310x48OQttvY1c4/L/fIHz6bhmwUc8KA2/by+zu7Of1 vvVOiuMrtjRhzVq5e2bsATq0CjSqkNNpL72ipQ2alH10UyqD3i9/gDmLdZp6wAAAA== X-Change-ID: 20261119-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-e11df3a8c1ba To: Mirian Shilakadze , Pavel Tikhomirov X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4263; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=HxmeK4dcGmJkSoxoNuT2N/VBPFppueFNZVf3+R/cMh4=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBq/27TVdv5hDztJHI/RA6iPBrk2zU6/0be4OMbi rw8CeUlzZ2JAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCav9u0wAKCRBRlgpH+WFc Kp6QEACHy/cIhRw0JfDGnh1urTe7I/N5PKfEiJhykkXu/jd7puH+G6AKfFhHm+5fmxFxkYd0/rd CkwQf1K9bzJ0Urxud8tdIaIlxiqKBDjQjTSexEyJm72Bb7vhSZw32L6LbD3H+h3Q+zNLrM2hDci njnFdSS9CdKeGKPvZDj+Cn0wc6GA5DmYLLFaySQ7EyP4C0uxDdFWRnH1TRmdvv4Xt+WG4zlCMHr VNNGWeb9k20tXzfKwdcpX3Kw68gNW9b22TKBCzaRXkBR1BzmUbj3seWSbEhXnfCcAX9hsHv152m qJy3gcWFWjjU8Ibq5CngUuQeY1ZzxPkzxF4rFMW9ZHp2UDvHDdy3x+cpshSC1pMmpBoab/wQlK5 hVX6RqMQPP70TA/45qms//XfqsTwn/1YqahlEOlrSiPnN87VB1K0A3PqowWDJt0eZoBT+PMcf7P rRyg/IC+/jCPu+YovBwZJ+bH7OfP81mmy228aSnnf2Bn//Q/Z1Lb5GtgJpiAJqOffOIsxEGn/2/ 6B46ZvcTsyPfyNaf9kGBWQvNAcX4gmB/izc20GjOW6ru+Xoa+gh9YfbgZDfV+SbeqjP8trV1zlu SZZ4HKggGAcbpL4uMo9JsuOqDI+3m0boVxeXAA207jWdCq7+YyhBkp9SvZzWxinQowbfbuyrljI ESrsNcEmvfkr9Xg== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH RFC hci-8.2 0/2] ve: Container start on the 26.3 kernel with libvzctl before 10.0.144 X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org The VSTOR-151265 series (26.3) hides the setup tasks of a VE from every other task of it while the VE is pseudosuper. ve_setup_task() marks a host task a setup task only while the VE is VE_STATE_STARTING; a host task entering afterwards is a VD_VE_ENTER_TASK and does not see them. libvzctl before 10.0.144 starts a Container like this: pseudosuper=1, clone the init, the init writes START (the VE is RUNNING from here on), then a helper joins the init's namespaces one by one through setns() and only then opens /proc//ns/mnt. The open comes from an ENTER task of a pseudosuper VE, so it is refused: Failed to open /proc//ns/mnt: Permission denied Failed to configure disk Cancel init execution Every Container start fails on the hci-8.1 userspace (libvzctl 10.0.134 and older). libvzctl 10.0.144 (vzctl commit 8bf40747, VSTOR-151174) opens every namespace fd before it joins the first, while the helper is still a ve0 task, and the start works; hci-8.2 ships 10.1.3 together with the 26.3 kernel. Verified on a test VM with the six Containers there: +----------------------------+-------------------+-----------------+ | kernel | libvzctl 10.0.134 | libvzctl 10.1.3 | +----------------------------+-------------------+-----------------+ | 26.3 as is | no CT starts | all start | | 26.3 + patch 1 | all start | not run | | RHEL 10.3 rebase as is | no CT starts | not run | | RHEL 10.3 rebase + patch 1 | all start | not run | +----------------------------+-------------------+-----------------+ So the 26.3 kernel depends on a libvzctl version and does not say so: no commit of the series, its Jira or kernel.spec names libvzctl >= 10.0.144, and no vz kernel spec ever carried a Conflicts: on vzctl or libvzctl. A node that gets the kernel, or a ReadyKernel patch with the series, without the libvzctl update loses every Container start. Two ways out, hence the RFC: 1. Apply patch 1. A host task that enters a VE while it is still pseudosuper becomes a setup task whatever ve.state says, so the old start sequence works again. The price: such a helper, if it stays in the VE without exec, turns into an ordinary task once pseudosuper is cleared (VD_VE_SETUP_TASK counts as VD_PTRACE_COREDUMP then), so the container can reach its host fds, while as an ENTER task it stays hidden for good. Mirian's view: the kernel is right, userspace must be 10.0.144 or newer. 2. Drop patch 1 and declare the dependency instead: Conflicts: libvzctl < 10.0.144 in kernel.spec, a release note, or both. Patch 2 is then wrong as it stands and can be turned round to check the series' contract: a host task joining a running pseudosuper VE does not reach the init, namespace fds opened before joining work, an exec'd binary does not reach it. Patch 2 is the selftest for the start sequence of libvzctl before 10.0.144: it starts a real VE (pseudosuper, clone3 into new pid, cgroup, net and mnt namespaces, START) and checks that a host task joining afterwards reaches the init's namespaces and an exec'd binary does not. It fails on 26.3 as is and passes with patch 1. https://virtuozzo.atlassian.net/browse/VSTOR-156164 To: Mirian Shilakadze To: Pavel Tikhomirov Assisted-by: LLM Signed-off-by: Konstantin Khorenko --- Konstantin Khorenko (2): ve: mark a host task entering a pseudosuper VE as a setup task selftests/ve: check a host task entering a pseudosuper VE reaches its init kernel/ve/ve.c | 17 +- tools/testing/selftests/ve/.gitignore | 1 + tools/testing/selftests/ve/Makefile | 1 + tools/testing/selftests/ve/ve_setup_task_test.c | 284 ++++++++++++++++++++++++ 4 files changed, 295 insertions(+), 8 deletions(-) --- base-commit: c1acd2c05aa3ebe0313958e2bd09f60f2040a5cb change-id: 20261119-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-e11df3a8c1ba Best regards, -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel