From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5EE9F45FCB for ; Thu, 2 Jan 2025 21:48:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E487E402D6; Thu, 2 Jan 2025 21:48:18 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 9ED64402B4 for ; Thu, 2 Jan 2025 21:48:17 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-436a03197b2so32362465e9.2 for ; Thu, 02 Jan 2025 12:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735850897; x=1736455697; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=tmGKCo8i78uhrdO+EvBVX80vEU55yCOCy5r6f8nZJCc=; b=GdvVEDw38aGx7UdVOgPHEYtnKYyW9M1nFpDxpvw5p5CQlpWT8rkQgfj9ewsqzUuRAH xLKG7qOSeErKhQFK0wydib441TTqVZDT29Y3fDaFDfbsICnbAdMEMAGqiG6/AJkoWtlj 3y93DNhtPsGXFBh+8FaJYC06ZsYKNOcx1KLhEsiq83HMuC1Lc2vFJLCxX2g4gAfho63l vxDefodFLgXKCePAxTYLayaZ8zQT/VuTK9TwSIyLsFqDxFvUh3fhCF4/q/IbX75CmUSw SGgtUn2LLgxQTYsnj0xjQLF0Mcm1Qys5I7X1ZBtL9SQ89OGLVy5Hgp5nsKEBcYilAjVw 3+tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735850897; x=1736455697; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tmGKCo8i78uhrdO+EvBVX80vEU55yCOCy5r6f8nZJCc=; b=XBDm5iRYLGTUdVXUjpt9s++J/jXXng9zdnqSSDo7Oy9dCB211OaCDLMqD+Rpmb+B5z qhM8kWjV+9wQpgtC1kGvslV6nohOb5aOGayFQrRQ9BsluyRMW8w3/5FZyEmqGQELsKJA Ymzw9oud0BiDgTYjuXmyhMWGujX/uWG57wPlJakqW9zlZVtvNXWQHu0fuS8peZ1PtMjD XFJziJ4RKSXWHj/CH3f4CXLU8ZOCYvXhpPtKIxE+p+VRo9x5HDMkOH2iMaR2WmO2fQUU no2HKg8hT9FzeDcwqPbWywRH5EAjsqY/ErHBb8FFErA8eStJMAoFQusWRRZkFxInBVpV VYhg== X-Gm-Message-State: AOJu0YyxCT0pToQt6DMX6zEVZt520JhUZOzWYGuBWBQ/1ivEyfuN5yWf NdcSGxd0s88rDexR0b1yQEjPymd3aDoZH5557kT7PVr6PVlG/MBr X-Gm-Gg: ASbGncvulpZuEqnF212e87SndPlLdTdtMwK++E3aPd64YgMVoXgGy5XeRJy0RHqZmBj 1OqR4KlRHGqa7XqY5SbvMZtDIy5VGRENsvPiwvrcYyj7tUTXi9FGJhnNCIIuex4O23dZhh6/9Ro 1bLlwo5IdUxWaplxUTTquEvHm3U+Fyfl7RFYP7xIE3FRZJE7igEsf9s9McIHYRKsTOk+w+7/3Xl TzqbOHYx4l2PCRBf+Aufu76LcOYJyvv/cDbnDvVPOvUkBiS1clIuC7GmvRtjEKvsfWPATqVG0ko 5HYjbgdP1x2bH5Qyxh3iyx6F6kPPXw== X-Google-Smtp-Source: AGHT+IG3UcA0chS1oasXM0zZ7a+cfIOWpSmg6TJtbCB7f8ZxPiCPQBYfwxKBt5LhHisUo1GOvx9r+g== X-Received: by 2002:a05:600c:4748:b0:434:a7e7:a1ca with SMTP id 5b1f17b1804b1-43668b5f5b7mr352222765e9.20.1735850896759; Thu, 02 Jan 2025 12:48:16 -0800 (PST) Received: from sovereign (broadband-109-173-43-194.ip.moscow.rt.ru. [109.173.43.194]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b119ccsm496003855e9.24.2025.01.02.12.48.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2025 12:48:16 -0800 (PST) Date: Thu, 2 Jan 2025 23:48:13 +0300 From: Dmitry Kozlyuk To: Alex K Cc: "users@dpdk.org" , "Burakov, Anatoly" Subject: Re: Multiple Users Running DPDK Apps Message-ID: <20250102234813.32d75421@sovereign> In-Reply-To: References: X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org 2025-01-02 19:44 (UTC+0000), Alex K: > Should multiple users be able to take turns running DPDK apps on the same system without using sudo? > > Hugepages setup is required for multi-process support. The usertools/dpdk-hugepages.py script accepts user id and group id arguments when mounting hugepages directory. And I was hoping that files created in this directory would be created such that they would be accessible by the users in this same group. However, I'm seeing that those created hugepages files get the 0600 permissions (read/write by the user only) and group ownership is not set to the group specified in the dpdk-hugepages.py script. So another user attempting to run DPDK apps gets a Permission denied error attempting to access hugepages files. > Is this a bug or by design? > Should each user have a separate hugepages directory setup somehow? > > I'm using vfio-pci kernel module with IOMMU, DPDK 23.11.1 LTS on RHEL 9. Seeing same behavior with 24.11.1 LTS. Tried to follow the instructions at: https://doc.dpdk.org/guides-23.11/linux_gsg/enable_func.html#running-dpdk-applications-without-root-privileges > > Would like to understand if what I'm attempting is supported and if there's anything I'm missing. > Thank you. Hi Alex, If you want to run independent applications as different users, you can use a common directory but specify different --file-prefix for each application (group of processes sharing hugepages). If you want to run different processes of one multi-process DPDK app as different users, they must use the common directory, so the current behavior with 0600 permissions is a blocker. They are set intentionally: http://git.dpdk.org/dpdk/commit/?id=da5d107207910fc318862579e7b588481c72c668 Ownership is not controlled, so default open(2) semantics apply, but there's still no way past the disabled group-writable bit. If this is the case, I wonder why this is needed? There isn't real privilege separation if processes share hugepages, which particularly means that both processes have access to HW and DMA.