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 4F6B880027 for ; Fri, 20 Nov 2026 14:41: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 6AKEe9gs027737; Fri, 20 Nov 2026 17:40:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AKEe9gs027737 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="lcHYpoEK" Received: from mail-yx1-f71.google.com (mail-yx1-f71.google.com [74.125.224.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AKEe77u027733 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Fri, 20 Nov 2026 17:40:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AKEe77u027733 Received: by mail-yx1-f71.google.com with SMTP id 956f58d0204a3-67c0efb7b97so1833211d50.3 for ; Fri, 20 Nov 2026 06:40:08 -0800 (PST) X-Gm-Message-State: APuU4Z+s8V7NQuUnJS9juDqMCPktytoYewYtFbeAHwWnQNParJPwCri9 M7RKVMsaadxjvEP/9a4PxYHMX2x+VmApcuL938/qQKbz5J1eaLedfywz+jxTCXSJm5z8Tlsjs9y rqu6meV+4eq4ka2sYl4E1IVuD7ZfHlKvV8LNTymWs7lcVkWZK0zAjqA== X-Gm-Gg: AZFdTZekpDelz/sPmNPUi9TVuR5v7L1NDBHIr5cAHhQggdRTIKeezuHsUwhQvGpXvQP 2ey+k7i05OCNVeMghgwPrnnaNqQQQztD55FjviEoyylHBVCoNVx42tS4diJ7IeRs3u9h3wVwkVu zQqSV1RYp1lTKcy+jTlLGDvZz7zJXUmiNVwlhojCbzi3eLo91wAf52kvtJ5CNT6Y5cSU1Gk8dyJ +1mVpNlrFyuBrSmfrbOLDhmv4IQF3odzt7dCSlo4G8FdXVRpbrj9muYgdOGlqcbsAO5IcTm70aX bzwVzo9nMe87+juHk0533JEg4O6f5ANpj2ksXYh6gLXALAfW24saF9yT1Qwegp4RIMvfhjePO0X nJyb8iGTz4RL+wllU5vT18aEBb6QKo27ACmXrw51Wo3PGCM3vDIvGsag1sKALEcXkFta6o8EvlJ NTtgrV7dq9owCy9y/kdELjK5AC X-Received: by 2002:a05:690c:6213:b0:8b4:cd96:e2dd with SMTP id 00721157ae682-8b52032afc8mr11282577b3.14.1795185606811; Fri, 20 Nov 2026 06:40:06 -0800 (PST) X-Received: by 2002:a05:690c:6213:b0:8b4:cd96:e2dd with SMTP id 00721157ae682-8b52032afc8mr11282547b3.14.1795185606219; Fri, 20 Nov 2026 06:40:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1795185606; cv=pass; d=google.com; s=arc-20260327; b=F3YLi/pOWHJsZSh+tGfLqADALFldVdQmFp0M2KpMSGUVWo7D4MvlCyfbm3/voeHF3X vDnmYSUCzpPt8QYULh7K+oOfPqzBpxsW3rugXyt13iq+96YjGznZ83oAOgUx6QNQ2hAL 6uep7AbB4a1Qd+WCMyFQNzVSNEUGLPBzUs86QOwLDWYEy2PiIevZ1RL5reDl11irjZmT kUEvlHAWmSyc8pnMSS8v0H+7xewDm7O6WmUHpjsYJJNhN32SG7vccK0IAzpA77TOiudD y30xPJPFukAV+dQliVqU05Cn4851RL8I7cfhNR75OJIKORnqe7dflNG3ntZ3aMjcrjK7 jhPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=mime-version:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=RmdXFX2wWkulmAr32ptkkKwr18QnemSJIyPq2hDdIqA=; fh=A/FjvCsBSAzw0FkyuX090bchzsDlBDtaQlwRJJlRgrc=; b=ANMAmNe5fsisvROZJJzsTYEoje06jz405tj2P91zLda3iMUcgChirbkgt+EQpR0G93 IFQz780llcG7lnkk2JeLnPTUhlAz1dJd8yqrCEu+Ik26LJ2mBNPDMmM/rT8R8Y+4pMG/ 1rWvun9Z4d9ANVxGAsIElaN1zzVy8GUWJCaVCfAGVVY05RUqFRIFXaz4pYrm3a0IIAnI rpxHdMbdZqO8kr3wNER+848O+G5omHwrP+qlv4WKmP2cEsA6YrPDcIraXq1rAUb2jHd5 Hvw7RmcT76oAX6g7VMRzcQehc49nDvMuqe7jm66Nj4jSBbTcuZX7n8rJMuHx1WaWUc7i Ii9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=lcHYpoEK; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c20f::7 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazlp170130007.outbound.protection.outlook.com. [2a01:111:f403:c20f::7]) by mx.google.com with ESMTPS id 00721157ae682-8b520349cecsi11941657b3.94.2026.11.20.06.40.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2026 06:40:06 -0800 (PST) Received-SPF: pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c20f::7 as permitted sender) client-ip=2a01:111:f403:c20f::7; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=lcHYpoEK; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c20f::7 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BqTThSJVwQcLr0GIGu+Y0guoiE40loxnMSu12az8idFoM0RNUKdm/AqgJ7GlXhEStei3OYLjwntzwXc+8p7r0YIWc1oGsz9Zex0mIVG0MztmyKnrnmvq97dGEvjWHEJVF0Dwl1WxMEyKqmK2X4qyYAH/D9VR31FtzV9FLFlS1wqCj2nAPn5h9rCgpC/y1rdi1ky3a74DkbuAtbjv82e7zUv011KP2CDYnyskDxNAUQhWWGhxjhG9/TAAiiD9SaoIbGzSqLAHRdQLfwHFTsVAUc58Z0xD2KKPbcdq09vul5+/uebO9dr8+WLoxQO0wLlHWaWzO0Vd4vxWBO5J3k7pDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RmdXFX2wWkulmAr32ptkkKwr18QnemSJIyPq2hDdIqA=; b=R4swpR5iYdR4SVqjmUnk1AdfoKj1mIjShJJVl1R6go8vcLUDPfHgZKzXT6AQOiJ5fEGmMuvAGz0F6hIjNoMND46xMuhZO6WxPTr4ebf3o+t4AUuDFaAkwhQBK5bACFDJKisHyz0L6YV9x4UlSBDz4guI5XoD+C4o0aJxJpsdzzZH8MD8EzScRORnA5LQJUZknaC2hTWf1m5WvAC79w5g0nXylAHIIWW8WwuW0dmdLAPAKCuOk4TW6tjia85iK0mJTrhvqUgMwjHIDhxE4EPKrjFkQ6edApICpSWqRE7BTGIGLtVEn59SWAFHIZ6EM84PLl/uRrB1n3BDbO6biIPm2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RmdXFX2wWkulmAr32ptkkKwr18QnemSJIyPq2hDdIqA=; b=lcHYpoEKbvos0XG0guD2T6pRD/Sz2msI2xb7NWuvh6sMDFS16O+wfZK4Pl5KDrpRColEp4Oq4HCaWpHwJVnox6TPpuy1wN/S+uCSaLeRIH6UqmkeJyxjfK9uY16I++CRFdgU/lVNvpu5IIFZoE1SpEbb6GqkaAF/jH9kE2deRDrnvgD3ktyTlgX7+gIb7uBUlg8AK4L/2Eumyyu4ax335QYUtCEb6a5+Y4INttvCwIvcj9dqI6lsWeIsSxNmWgXO+J1NUgepBFwT8M4ZTTSdt1cNMjs6qbmFo2Dq6Pda57ExUNLTgiFnvzBD+p4H1HcRNRbleRQK3KXQ+xG3YCC54w== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM0PR08MB11804.eurprd08.prod.outlook.com (2603:10a6:20b:747::14) by VE1PR08MB5711.eurprd08.prod.outlook.com (2603:10a6:800:1ae::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.639.12; Fri, 20 Nov 2026 14:40:00 +0000 Received: from AM0PR08MB11804.eurprd08.prod.outlook.com ([fe80::bf46:f137:f6d2:5b3a]) by AM0PR08MB11804.eurprd08.prod.outlook.com ([fe80::bf46:f137:f6d2:5b3a%7]) with mapi id 15.21.0639.011; Fri, 20 Nov 2026 14:40:00 +0000 Message-ID: Date: Fri, 20 Nov 2026 15:39:59 +0100 User-Agent: Mozilla Thunderbird To: Konstantin Khorenko , Mirian Shilakadze References: <20261120-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-v3-0-fb0214ce4f45@virtuozzo.com> <20261120-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-v3-2-fb0214ce4f45@virtuozzo.com> Content-Language: en-US From: Pavel Tikhomirov In-Reply-To: <20261120-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-v3-2-fb0214ce4f45@virtuozzo.com> X-ClientProxiedBy: BE1P281CA0438.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:81::18) To AM0PR08MB11804.eurprd08.prod.outlook.com (2603:10a6:20b:747::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR08MB11804:EE_|VE1PR08MB5711:EE_ X-MS-Office365-Filtering-Correlation-Id: f35f3218-a38c-4d4a-1e59-08df471427cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|23010399003|10070799003|6133799003|261009223027099003|22082099003|18002099003|261021121427099003|261026140227099003|261026121527099003|261022105027099003|261028144727099003|4143699003|56012099006|10067099003|261102123227099003; X-Microsoft-Antispam-Message-Info: JSq+rXDwayyRwaDyTcMshlFu94kJ6UmEp3Ji4Mk1O+Dw/9HNXDhEK9FbT6ewBiWLNoWRhbzEuLS6Yewg4+dIR5u1u84LLKNWGVTUQ+tiiVeN4ud3cPMerYXWtqbVnZKp6UcxA0rkHZJUKzqRXqGTR8Ub+icB1Arz4TK2o1eyUDeANgxec3ZlFL2dasZQkCd5KWOKydV0NgOD0iQ//Zl9lpnEqeyzb3O2pmXRqVGlHj5b+1Xz4/YQq3G35hh2O23FUUgMRSx/B3ehwpBKIntsa1aVelhT5RfNxr37P42gdoIC70Q199Mvf2v2xywKO1Y30xCF6I4thLKVWxAP0eopBZylLy79uHdk6wPNcKI2JYHAw7llALx4qL45Ton4cFzi7RDBS3i8pX0JctWkz9PtVwa64T9wJzJ3WlUua4cEuFBHABoKQhoeKNLq2mRCNw3t/CdlZZxsDGFyZ70AwCDByel461Eh7zkL28eL5+Pwl05e0Mft5e2dYidb10hwWoEZmx/rj0m6pDDXExzcWvT2XWxWbRlgevupI05SayzSXLGiwcYpKrvKS8dUo0vdS59+zavRusZ+EFmyQKSIVBRXZ0xtUIFeAiRtnc2AJqq3FPqvaL1Y2L4Y1FcqPNeOUv3y X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB11804.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(23010399003)(10070799003)(6133799003)(261009223027099003)(22082099003)(18002099003)(261021121427099003)(261026140227099003)(261026121527099003)(261022105027099003)(261028144727099003)(4143699003)(56012099006)(10067099003)(261102123227099003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dU1NMWYzS1dyRThQZWN3emxwRmM4U0IrSGNzMGZtTGpGVGRhdzBQT0x0Nmcx?= =?utf-8?B?TGlUL0I3VFhoRnlKNThZcXU4YnR4eUNOTXU3QWljY0ZIemtLdWpiSFdiVUh5?= =?utf-8?B?QjZFM2lZanVoNGUrV1Q1MHFQemhEd3YwK3VLU1E2WDFxQ1VyUjNvMjNMeUxN?= =?utf-8?B?RWpGZ3VYd2tLTDl0eFY5dFQ0ZHhpSGNlek9qbzhpekF4MUM1ZE9zVlREc25a?= =?utf-8?B?aW1uL3czQVJTeXdVaElGdEtveThTV21jYkNCOEtkczNxSlFXRXFEc2lvWHd3?= =?utf-8?B?bXpVQ2M1YTlIWEpYNHozblNRcWZLVkNrRy9UMXFxY3pEL3pDSnVnNGhDTDQw?= =?utf-8?B?SXRpWDlqaDZadzZUZU9aTSsrMDEwWjdRQkZESzJjL3dCNUxXZnpKdytEbWtR?= =?utf-8?B?dmsydEtCNUxCYk9FTmJ5aU9VQXRIWEkyb2owUUNlY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Z6U2NHR2YrV1Z3MmxBQWFmSzlpbjlOeHAvMkdqY2xMV2JsY1dSYWNvOVA0?= =?utf-8?B?a1JyckF0RXpTZ0UvMGQrNkQvSHR3US9JT2F6QkZmdWRBODdMSEZqV055ci9Q?= =?utf-8?Q?Szk/4eYI2DbyjKyNpS1vOvCDCtZOLNNUGf7BJ+u6hXphb?= X-MS-Exchange-AntiSpam-MessageData-1: wRlacKDS8o5wB/gQH/dVvSdexsKmUP6hCD8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f35f3218-a38c-4d4a-1e59-08df471427cb X-MS-Exchange-CrossTenant-AuthSource: AM0PR08MB11804.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2026 14:40:00.3537 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SHedLfarXZmR4GAo2inM3AZsfvCMLX0EbYD6Dw62uGU383JWTRx7MibV29tFjH95tZmTgYPRL31r9ntENwOeDD+I4YWqYgFbJ4tlD8J0QIY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5711 X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.2 v3 2/2] selftests/ve: check a host task entering a pseudosuper VE reaches its init 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 On 11/20/26 15:25, Konstantin Khorenko wrote: > libvzctl before 10.0.144 starts a Container with ve.pseudosuper set: > the init it clones writes START to ve.state, then a helper forked on > the host enters the init's namespaces and opens its /proc//ns/mnt. > While the VE is pseudosuper the init, a setup task, is reachable only > from the host's tasks, so the helper must count as one. > > Start a VE the same way and check that a host task entering it through > the ve namespace reaches the init, and that a binary exec'd inside the > VE still does not. Before the fix the first test fails with EACCES, the > error vzctl start reports. > > https://virtuozzo.atlassian.net/browse/VSTOR-156164 > > Feature: trace: prohibit tracing sensitive tasks from CT > Signed-off-by: Konstantin Khorenko > --- > tools/testing/selftests/ve/.gitignore | 1 + > tools/testing/selftests/ve/Makefile | 1 + > tools/testing/selftests/ve/ve_setup_task_test.c | 304 ++++++++++++++++++++++++ > 3 files changed, 306 insertions(+) > > diff --git a/tools/testing/selftests/ve/.gitignore b/tools/testing/selftests/ve/.gitignore > index 9f0f4832326ef..f53f178190d8a 100644 > --- a/tools/testing/selftests/ve/.gitignore > +++ b/tools/testing/selftests/ve/.gitignore > @@ -9,5 +9,6 @@ ve_numa_syscalls_prohibited_test > ve_tmpfs_mpol_test > ve_devcg_bpf_test > ve_printk_test > +ve_setup_task_test > test_segf > test_trap > diff --git a/tools/testing/selftests/ve/Makefile b/tools/testing/selftests/ve/Makefile > index 36c068b4bb66c..0064804e289d8 100644 > --- a/tools/testing/selftests/ve/Makefile > +++ b/tools/testing/selftests/ve/Makefile > @@ -12,6 +12,7 @@ TEST_GEN_PROGS += ve_numa_syscalls_prohibited_test > TEST_GEN_PROGS += ve_tmpfs_mpol_test > TEST_GEN_PROGS += ve_devcg_bpf_test > TEST_GEN_PROGS += ve_printk_test > +TEST_GEN_PROGS += ve_setup_task_test > TEST_GEN_FILES += test_segf test_trap > > # CPUID faulting is x86-64 only. ARCH says "x86" for 32-bit too and lib.mk > diff --git a/tools/testing/selftests/ve/ve_setup_task_test.c b/tools/testing/selftests/ve/ve_setup_task_test.c > new file mode 100644 > index 0000000000000..7f3c2ca7ec4e9 > --- /dev/null > +++ b/tools/testing/selftests/ve/ve_setup_task_test.c > @@ -0,0 +1,304 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * ve_setup_task selftest > + * > + * libvzctl before 10.0.144 starts a Container with ve.pseudosuper set: > + * the init it clones writes START to ve.state, and only then a helper > + * forked on the host enters the init's namespaces and opens its > + * /proc//ns/mnt. While the VE is pseudosuper the init, a setup > + * task, is reachable only from the host's tasks, so the helper must > + * count as one, or the start fails with EACCES. A container binary, one > + * exec'd inside the VE, must still not reach the init. > + * > + * The tests start a VE that way and check that: > + * > + * - a host task entering the running pseudosuper VE reaches the init > + * - a binary exec'd inside the VE does not > + */ > +#define _GNU_SOURCE > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "../kselftest_harness.h" > +#include "ve_selftest.h" > + > +/* Re-exec of the test binary: open the mnt namespace of the given pid. */ > +#define PROBE_ARG "--open-mnt-ns" > + > +FIXTURE(ve_setup_task) > +{ > + int cgv2_fd; > + int ctid; > + pid_t init_pid; > + int init_release; /* its read end holds the init */ > + struct namespace_ctx ns_ctx; /* the VE namespace of the init */ > + char exe[PATH_MAX]; /* this binary, for the probe exec */ > +}; > + > +/* 0 when /proc/@pid/ns/mnt opens, else errno. */ > +static int open_mnt_ns(pid_t pid) > +{ > + char path[64]; > + int fd; > + > + snprintf(path, sizeof(path), "/proc/%d/ns/mnt", pid); > + fd = open(path, O_RDONLY); > + if (fd < 0) > + return errno; > + close(fd); > + return 0; > +} > + > +static int ve_write(FIXTURE_DATA(ve_setup_task) * self, const char *file, > + const char *val) > +{ > + char path[64]; > + > + snprintf(path, sizeof(path), "%d/%s", self->ctid, file); > + return write_file_at(self->cgv2_fd, path, val); > +} > + > +static int ve_read(FIXTURE_DATA(ve_setup_task) * self, const char *file, > + char *buf, size_t len) > +{ > + char path[64]; > + > + snprintf(path, sizeof(path), "%d/%s", self->ctid, file); > + return read_file_at(self->cgv2_fd, path, buf, len); > +} > + > +/* > + * The init of the VE: start it, report the result and stay until the > + * test closes the release pipe. > + */ > +static void run_init(FIXTURE_DATA(ve_setup_task) * self, int status[2], > + int release[2]) > +{ > + char c; > + > + prctl(PR_SET_PDEATHSIG, SIGKILL); > + close(status[0]); > + close(release[1]); > + c = ve_write(self, "ve.state", "START") ? errno : 0; > + if (write(status[1], &c, 1) != 1) > + _exit(1); > + close(status[1]); > + while (read(release[0], &c, 1) < 0 && errno == EINTR) > + ; I don't like those hanging ";", why not write regular non-empty loop here? Also LKCS suggests to avoid putting multiple expressions on one line. while (read(release[0], &c, 1) < 0) { if (errno != EINTR) break; } > + _exit(0); > +} > + > +/* Wait for the VE to stop after the init is released, then remove it. */ > +static void stop_ve(FIXTURE_DATA(ve_setup_task) * self) > +{ > + char state[32], path[64]; > + int i; > + > + if (self->init_release >= 0) > + close(self->init_release); > + if (self->init_pid > 0) > + waitpid(self->init_pid, NULL, 0); > + for (i = 0; i < 500; i++) { > + if (ve_read(self, "ve.state", state, sizeof(state)) < 0 || > + !strncmp(state, "STOPPED", 7) || > + !strncmp(state, "STARTING", 8)) > + break; > + usleep(10000); The usleep can be interrupted which leads to impresise timing and potentially racy tests. > + } > + ve_write(self, "ve.pseudosuper", "0"); > + /* The start makes a vz.slice child under the VE root */ > + snprintf(path, sizeof(path), "%d/vz.slice", self->ctid); > + unlinkat(self->cgv2_fd, path, AT_REMOVEDIR); > + destroy_ve(self->cgv2_fd, self->ctid); > +} > + > +/* > + * Start the VE the way vzctl does: pseudosuper first, then an init cloned > + * from the host writes START. The start needs the init in its own pid, > + * cgroup and net namespaces. Returns -1 with the failed step in @what. > + */ > +static int start_ve(FIXTURE_DATA(ve_setup_task) * self, const char **what) > +{ > + struct clone_args cargs = { > + .flags = CLONE_NEWVE | CLONE_NEWPID | CLONE_NEWCGROUP | > + CLONE_NEWNS | CLONE_NEWNET, > + .exit_signal = SIGCHLD, > + }; > + char state[32], path[64], val[32]; > + int status[2], release[2]; > + unsigned int veid; > + int ret; > + char c; > + > + *what = "ve cgroup"; > + self->ctid = make_ve(self->cgv2_fd, CTID_MIN); > + if (self->ctid < 0) > + return -1; > + > + /* A random high veid, as a container gets, so it clashes with none */ > + *what = "ve.veid"; > + if (getrandom(&veid, sizeof(veid), 0) != sizeof(veid)) > + return -1; > + veid = (veid >> 2) | (1u << 30); > + snprintf(val, sizeof(val), "%u", veid); > + if (ve_write(self, "ve.veid", val) < 0) > + return -1; > + *what = "ve.pseudosuper"; > + if (ve_write(self, "ve.pseudosuper", "1") < 0) > + return -1; > + > + *what = "pipe"; > + if (pipe(status) < 0) > + return -1; > + if (pipe(release) < 0) { > + close(status[0]); > + close(status[1]); > + return -1; > + } > + > + /* The init: a host task cloned into the VE while it starts */ > + *what = "clone3"; > + if (enter_cgroup(self->cgv2_fd, self->ctid) >= 0) > + self->init_pid = syscall(__NR_clone3, &cargs, sizeof(cargs)); > + if (self->init_pid == 0) > + run_init(self, status, release); > + close(status[1]); > + close(release[0]); > + self->init_release = release[1]; > + if (enter_cgroup(self->cgv2_fd, 0) < 0 || self->init_pid < 0) { > + close(status[0]); > + return -1; > + } > + > + *what = "ve.state START"; > + ret = read(status[0], &c, 1); > + close(status[0]); > + if (ret != 1) { > + if (ret == 0) > + errno = EPIPE; > + return -1; > + } > + if (c) { > + errno = c; > + return -1; > + } > + *what = "ve.state is not RUNNING"; > + if (ve_read(self, "ve.state", state, sizeof(state)) < 0) > + return -1; > + if (strncmp(state, "RUNNING", 7)) { > + errno = EINVAL; > + return -1; > + } > + > + *what = "/proc//ns/ve"; > + snprintf(path, sizeof(path), "/proc/%d/ns/ve", self->init_pid); > + self->ns_ctx.ve_fd = open(path, O_RDONLY); > + if (self->ns_ctx.ve_fd < 0) > + return -1; > + self->ns_ctx.ns_save_mask = CLONE_NEWVE; > + return 0; > +} > + > +FIXTURE_SETUP(ve_setup_task) > +{ > + const char *what; > + ssize_t len; > + int ret, err; > + > + self->ctid = -1; > + self->init_pid = -1; > + self->init_release = -1; > + self->ns_ctx.ns_save_mask = 0; > + > + len = readlink("/proc/self/exe", self->exe, sizeof(self->exe) - 1); > + ASSERT_GT(len, 0); > + self->exe[len] = '\0'; > + > + self->cgv2_fd = open_cg2_fd(); > + if (self->cgv2_fd < 0) > + SKIP(return, "cannot open cgroup2: %s", strerror(errno)); > + if (write_file_at(self->cgv2_fd, "cgroup.subtree_control", > + VE_CONTROLLERS) < 0) { > + err = errno; > + close(self->cgv2_fd); > + SKIP(return, "cannot enable the ve controller: %s", > + strerror(err)); > + } > + > + /* The harness skips the teardown when the setup fails */ > + ret = start_ve(self, &what); > + err = errno; > + if (ret) { > + stop_ve(self); > + close(self->cgv2_fd); > + } > + ASSERT_EQ(ret, 0) TH_LOG("%s: %s", what, strerror(err)); > +} > + > +FIXTURE_TEARDOWN(ve_setup_task) > +{ > + if (self->ctid < 0) > + return; > + close_namespace_fds(&self->ns_ctx); > + stop_ve(self); > + close(self->cgv2_fd); > +} > + > +static int open_init_mnt_ns(void *arg) > +{ > + int err = open_mnt_ns(*(pid_t *)arg); > + > + if (err) > + fprintf(stderr, "%s: /proc//ns/mnt: %s\n", __func__, > + strerror(err)); > + return err ? -1 : 0; > +} > + > +TEST_F(ve_setup_task, host_task_reaches_init) > +{ > + EXPECT_EQ(run_in_ve(self->cgv2_fd, self->ctid, &self->ns_ctx, > + CLONE_NEWVE, open_init_mnt_ns, &self->init_pid), 0); > +} > + > +TEST_F(ve_setup_task, exec_in_ve_does_not_reach_init) > +{ > + char pid[16]; > + int status; > + pid_t p; > + > + snprintf(pid, sizeof(pid), "%d", self->init_pid); > + p = fork(); > + ASSERT_GE(p, 0); > + if (p == 0) { > + if (enter_cgroup(self->cgv2_fd, self->ctid) < 0 || > + enter_namespaces(&self->ns_ctx, CLONE_NEWVE) < 0) > + _exit(254); > + execl(self->exe, self->exe, PROBE_ARG, pid, NULL); > + fprintf(stderr, "execl(%s): %s\n", self->exe, strerror(errno)); > + _exit(254); > + } > + ASSERT_EQ(waitpid(p, &status, 0), p); > + ASSERT_TRUE(WIFEXITED(status)); > + ASSERT_NE(WEXITSTATUS(status), 254); > + EXPECT_EQ(WEXITSTATUS(status), EACCES) > + TH_LOG("open of the init's mnt namespace: %s", > + strerror(WEXITSTATUS(status))); > +} > + > +int main(int argc, char **argv) > +{ > + if (argc == 3 && !strcmp(argv[1], PROBE_ARG)) > + return open_mnt_ns(atoi(argv[2])); > + return test_harness_run(argc, argv); > +} > -- Best regards, Pavel Tikhomirov Senior Software Developer, Virtuozzo. _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel