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 4BB9E457A1; Mon, 12 Aug 2024 17:04:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1149440A76; Mon, 12 Aug 2024 17:04:36 +0200 (CEST) Received: from mail-yw1-f227.google.com (mail-yw1-f227.google.com [209.85.128.227]) by mails.dpdk.org (Postfix) with ESMTP id EF33940A76 for ; Mon, 12 Aug 2024 17:04:34 +0200 (CEST) Received: by mail-yw1-f227.google.com with SMTP id 00721157ae682-65f7bd30546so31823087b3.1 for ; Mon, 12 Aug 2024 08:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1723475074; x=1724079874; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KRYpwQ5H+vGugnyM8LGTNOKISUvZtI3WlOZO7W60JRQ=; b=cI+hbCpfqnjgadWrQdI2E/3dQo/6oc8Myma5XjJxvS1YXPwlvIIwT1ITsVLNohE4je q9Wk7qVOq8sgTYRKf4/vI6NYoqcG2FwYG6YtWQBoiQodDv6ODBUXoo0Ec5JZR531OsWY dpywKJ0iDKnKptrO+y4KxPHtlZ/DZsoGtWYQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723475074; x=1724079874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KRYpwQ5H+vGugnyM8LGTNOKISUvZtI3WlOZO7W60JRQ=; b=Hay/wCfGXKtlbcLwgyYWoGNIVHXaOYLfhmlZxYpOuFJWRfGkSxlXioXOKb+y4gVNRA U97zDIKUino9Lz8HQGt46UkKrhuVHBE1+DVBdQaPZibI1EYnwTpjqs4BmXxHnO8FactJ w4Sn5uv3kD0PkJrzCGMdJG5FWR+ndNXU4BrYVrWCxfrauzhOzsZVD4qbt2c3UOJOQKuq a34tK5ATwkZyjTrYAdue3jHJ0lwBwG5gyaxztQETDNw2gnfHXiDCnt6NLrKi2yrfQxkm 54IImJWIHpA5gtxqdNnCD3GfreB/iPWjmhsVxNZENJsAyuudOUxUp/iQRXb5cVoKnmBn 6KuA== X-Gm-Message-State: AOJu0YytfvrIxGLbs7qRgfO6WxzdwZfmgHF2fATKUX7RpzHQcqrpvJdl c07gpAWoIbPK0qczfXVAlIhLFIK43Cslf2XBhcR2R4I1DDZTfWUxxKsiyXFjLzPmhhTTCuaQ84N sP0GVjgrt43pB2GJaJX4wAk9zpdh0xbX8 X-Google-Smtp-Source: AGHT+IEmlFwrJ98jwAn0KlsWjzfHicamo6yQfPDgqbLs5hNUq+LcxP2R3wPShS8xqJdk8aMJAqZoGpBRON1A X-Received: by 2002:a05:690c:480d:b0:66a:bf53:e077 with SMTP id 00721157ae682-6a99f6a6b01mr3569667b3.16.1723475074114; Mon, 12 Aug 2024 08:04:34 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id 00721157ae682-6a0a3c75cbcsm4256377b3.56.2024.08.12.08.04.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Aug 2024 08:04:34 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::1083]) by postal.iol.unh.edu (Postfix) with ESMTP id 004E7605C380; Mon, 12 Aug 2024 11:04:32 -0400 (EDT) From: jspewock@iol.unh.edu To: probb@iol.unh.edu, Honnappa.Nagarahalli@arm.com, npratte@iol.unh.edu, juraj.linkes@pantheon.tech, wathsala.vithanage@arm.com, yoan.picchi@foss.arm.com, thomas@monjalon.net, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, alex.chapman@arm.com Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v1 1/1] dts: add admin privileges to hugepage mounting Date: Mon, 12 Aug 2024 11:04:21 -0400 Message-ID: <20240812150421.31226-2-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240812150421.31226-1-jspewock@iol.unh.edu> References: <20240812150421.31226-1-jspewock@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Jeremy Spewock There were two different commands in the hugepage mounting process that were not using super-user privileges; one for unmounting hugepages and another for re-mounting them. This patch adds the flag that enables enhanced permissions for both of these actions. Bugzilla ID: 1439 Fixes: b8bdc4c58f57 ("dts: replace pexpect with fabric") Cc: juraj.linkes@pantheon.tech Signed-off-by: Jeremy Spewock --- dts/framework/testbed_model/linux_session.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py index 99abc21353..544a665b83 100644 --- a/dts/framework/testbed_model/linux_session.py +++ b/dts/framework/testbed_model/linux_session.py @@ -123,12 +123,12 @@ def _get_numa_nodes(self) -> list[int]: def _mount_huge_pages(self) -> None: self._logger.info("Re-mounting Hugepages.") hugapge_fs_cmd = "awk '/hugetlbfs/ { print $2 }' /proc/mounts" - self.send_command(f"umount $({hugapge_fs_cmd})") + self.send_command(f"umount $({hugapge_fs_cmd})", privileged=True) result = self.send_command(hugapge_fs_cmd) if result.stdout == "": remote_mount_path = "/mnt/huge" - self.send_command(f"mkdir -p {remote_mount_path}") - self.send_command(f"mount -t hugetlbfs nodev {remote_mount_path}") + self.send_command(f"mkdir -p {remote_mount_path}", privileged=True) + self.send_command(f"mount -t hugetlbfs nodev {remote_mount_path}", privileged=True) def _supports_numa(self) -> bool: # the system supports numa if self._numa_nodes is non-empty and there are more -- 2.45.2