From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id D85D680160 for ; Wed, 9 Sep 2026 14:35:19 +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 689EY5RP020419; Wed, 9 Sep 2026 17:34:06 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 689EY5RP020419 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="fFftWJvg" Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 689EXvbS020391 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 9 Sep 2026 17:33:57 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 689EXvbS020391 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-482f41ca436so5357147f8f.1 for ; Wed, 09 Sep 2026 07:33:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBwlpWWt+zQnrDpe64Xdd8lle7UcHc1Gkrt7DL6dCsudqqzu3u8yW2BaQ6HjzY4Rmfd/fMwkGw==@openvz.org X-Gm-Message-State: AFuF++lvdlI7XWNeXg2P2RAYQ2QrgFRpFonTAuJ6W5h/9XruJNp9EwCM OFruAVinRpWtKp+9SKHxPsPPwEFhhk6PHtNW2sBnbyjJHBO3Ia1sCGc2RqL3go7t+hFk/Q5073y u+Q+eaSKL9jzbcpcrHrK68ipdDm+wMR09CSLP2+VV6AVEGXOl+TD8kw== X-Gm-Gg: AYBFou3+TJPGcPtprYDOO0HmgVJKX31fUTgeN3xEG75ovTLRKgG6C3K6mRnZNllY82k CiA7R2Io6tnyk2P9gZgCmenoYG+yDiL9lYVmOgmsUqNTwjVQXqZgMZZ4DNbnrl7YSHQO5y2nhd7 seEdrbI3iKND/c2z5IHRfWKki5cQZfo5IEIDAQ27Tr0EzhJdVABNYdUl32SIJBA/opwxjH+7I/t hZq4+/B+0b30jg7HFCcPmQTP/Zbb2HGz172SQmPO75+2oUQo3ZV+TKgEOGEX8rcl9k5sP9UzE2v S1HwtSVOOcmdU3Fp4h5zhxPSDZZs6cljdF1oYLgzXNwR0TIWn5E9/fha58cRQD/yb33YdADE2PU Pe3zSGrnv9E3+2M3RQr5miN54Lg8hH58= X-Received: by 2002:adf:e008:0:20b0:484:478e:e19f with SMTP id ffacd0b85a97d-48586e33efbmr27530647f8f.0.1788964437016; Wed, 09 Sep 2026 07:33:57 -0700 (PDT) X-Received: by 2002:adf:e008:0:20b0:484:478e:e19f with SMTP id ffacd0b85a97d-48586e33efbmr27530602f8f.0.1788964436466; Wed, 09 Sep 2026 07:33:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788964436; cv=none; d=google.com; s=arc-20260327; b=hqSt3KRTb7KwFC3TsHFWQ2Nnh9yXISIz6xrXKRXg8Km8cljECFZrMTf+2mHc+KeYFx FG2rJmXTx9qHBGWTbWZMDdncfht7SX6xoUITHEbcGZknnigo6ijSloGCeRpQpqbIHnke n7qXUNHE3AlX6ckNEahJrp5Y8y8igdrFHmYahCx+U8hrt5/Lt1Q/K/Kuuz8fn3PoyE1e yvBZUser9eR4A5Tn2foSsoFrMVncJ3rBdfXqCJpu2PoFk04s7u0dV2OxKlk7ncVTVwAZ SdqR+gPSIAKvTEJEw1t9ZjBrYkA2ZGATCywAgTrf9WDSVPDBO6FmKS6jeEtdfLGFO7I/ xAGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=ZoQcPjaLzq8Myk1vA8l1kP6hnTW1c4l5QBhFlWhGVkE=; fh=8+X+w90mdJ6G1WJJJxch/JQtL3s0QC+l1k0I7SQJzmc=; b=OUSEQ41/PmhiGcgKe7m9ZI0ZZKQ70OAAqwSZbTl193PYVkgushHeavl2DEf3btWCSc 0Qhmm86YSGQ/MAAOr6ZfymJWqOZ+74yGmhmi1CNSHVidT+4nBNWGnzo30Hf7AzpvenWI V1JGBrZh0HulJYKWCiaE/ftGVnELne1NjLzILVZPg6nkVjDXeRhZ0JvzOUub73GrkFms dUcJilom1I04cpsQv4s+rDtpUAhkwaQm407b3BNSEMw2o/a04MEQ7zLd6hBslexYuGsx 6/sIPtUG4/lZLQoyburT9+/DzEYRBbJroHeZDMxLNoI1gATnFQlKMRFVZU329fJw9SUb BJyw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=fFftWJvg; spf=pass (google.com: domain of vasileios.almpanis@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vasileios.almpanis@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 ffacd0b85a97d-485885ef65bsi34488382f8f.488.2026.09.09.07.33.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 07:33:56 -0700 (PDT) Received-SPF: pass (google.com: domain of vasileios.almpanis@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=fFftWJvg; spf=pass (google.com: domain of vasileios.almpanis@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vasileios.almpanis@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=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=ZoQcPjaLzq8Myk1vA8l1kP6hnTW1c4l5QBhFlWhGVkE=; b=fFftWJvg/Hv8 UxTVdXhg96nMqsVFzpzCCs9WMJPssggd5tyvVqCf3pYy13qhLuJw05i1rRtfML8oe2fKTzlrbXx7E sEJMDmjoXGYZNWxsKswKMotsc1J3gWdK2K4rubI4hAVVk795a5tHyAPXRT30R/vmWIfaKSP0Br3T+ SwdHfT9QzgUk0ZlnXljVIDYitQLB3oi9zvNO3KZhdhC9sNzv+gX3OMGTPs5eqPnGStD1pkMqUrXv4 iXSRQKUpdBmOnkKOzPj3ZTjVGJvVb0uMW/VZgBJGIorlOA6QvSgNyYIfoXvGkBJr4trpyXVINOXay T/vzbgo6fWcT9j1v1Hz97w==; Received: from [130.117.225.5] (helo=dev010.ch-qa.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x4JKV-005BC3-2Z; Wed, 09 Sep 2026 16:33:54 +0200 MIME-Version: 1.0 From: Vasileios Almpanis To: Vladimir Riabchun In-Reply-To: <20260909-ve-selftest-improv-v2-3-aad0a25d6569@virtuozzo.com> References: <20260909-ve-selftest-improv-v2-0-aad0a25d6569@virtuozzo.com> <20260909-ve-selftest-improv-v2-3-aad0a25d6569@virtuozzo.com> Date: Wed, 09 Sep 2026 14:33:53 +0000 Message-Id: <178896443373.479408.11976716167479776365.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788964435; l=1698; i=vasileios.almpanis@virtuozzo.com; s=20260812; h=from:subject:message-id; bh=wk6UVNBk8gYGHltceXBPVVYOrgaFRrQaCrSDrvRv5aE=; b=d1iGnAz0cF3XxFpnVZIN8sXGMD2KajiJQCh85oX0U2tLt5oROBfpSO57EB59AO1HH7BM1zGvV RR5wUQ6SiHNBXFInkBA8oue46+kk53KpOf7ZHoAl+73ItAHVW+dqo6+ X-Developer-Key: i=vasileios.almpanis@virtuozzo.com; a=ed25519; pk=HhuHDXAcPva9A8zccWEMRsb36reu+y4IVbBjXKxNUjw= X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH VZ10 v2 3/3] ve_namespace: Allow entering non-running VE namespace 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 > This doesn't bring a lot of value and makes tests more complex. > To enter VE namespace we need to actually start VE. > > In vzctl we have locking to prevent parallel creations. > If someone decides to skip locks and start one CT > in parallel - big mistake, but not ours. > > https://virtuozzo.atlassian.net/browse/VSTOR-144504 > > Feature: ve selftests > Signed-off-by: Vladimir Riabchun > > diff --git a/kernel/ve/ve_namespace.c b/kernel/ve/ve_namespace.c > index 3dbe0dde2645..879a7863e33f 100644 > --- a/kernel/ve/ve_namespace.c > +++ b/kernel/ve/ve_namespace.c > @@ -227,7 +227,8 @@ static int ve_ns_install(struct nsset *nsset, struct ns_common *new) > return -EPERM; > > if (!VE_IS_RUNNING(ve_ns->ve)) > - return -EINVAL; > + pr_warn_once("Switching to a non-running ve %s.\n", Maybe better print ve->veid instead of ve_name(). ve_offline() sets ve->ve_name to NULL when the ve cgroup is removed, so we will see "ve (null)" in that case. > + ve_name(ve_ns->ve)); This change means that now a host task can enter the CT before the CT has been started. A task can enter into the VE by two ways either copy_ve_ns or by switch_ve_namespace both of which call ve_setup_task. This function sets whether the task can be ptraced, core dumped etc which will be skipped because ve_setup_task checks if ve is running which it will not be. So here we break the invariant that tasks that enter into the ve from host cannot be ptraced etc. I suggest to add a flag to ve_setup_task entered which will be 1 for switch_ve_namespace and 0 for copy_ve_ns -- Vasileios Almpanis _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel