From patchwork Fri Nov 24 01:47:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 13466875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 771B5C636D0 for ; Fri, 24 Nov 2023 01:48:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.640075.997902 (Exim 4.92) (envelope-from ) id 1r6LJ8-0002V6-Py; Fri, 24 Nov 2023 01:48:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 640075.997902; Fri, 24 Nov 2023 01:48:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6LJ8-0002UQ-K1; Fri, 24 Nov 2023 01:48:38 +0000 Received: by outflank-mailman (input) for mailman id 640075; Fri, 24 Nov 2023 01:48:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6LJ7-0002RQ-No for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 01:48:37 +0000 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 92e91973-8a6b-11ee-9b0e-b553b5be7939; Fri, 24 Nov 2023 02:48:34 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id C8BCC3200A49; Thu, 23 Nov 2023 20:48:31 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 23 Nov 2023 20:48:32 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 20:48:30 -0500 (EST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 92e91973-8a6b-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1700790511; x=1700876911; bh=LX yAOwjjde0ByZ9X1DEhA7dY4ff5w8COeOtbRqSP8vg=; b=Pdug+HOGAg7VS85J4z BNN594jq/XE/8+nYpETemTpPhbQDUo7R9Vl3D2sZh8qGPDEGE2kMRj+my8W9ZjPX OiTtAaPSAdtp/8JcIwZAK7xEmT3ts0tUF5zwayUmbwuGk48/9fG2rqnpaLHCSlR4 I/tbZ38ooYCDO3LgmDADS/441aJYHU5mB/e+WbTNwwYyCPlDYFIJGHGxvnPzWKoT oQLUa8lJs53nFwzwp1d+8mnxFO0KbDyWUry5TCq2uo92WkJOmqRnjhgXr0foEyAO 03JzV5fT+seBNl4wDLqo17cXrUCZuMIeY4/B+IeKsmebWo8zuAjsjMYBsV+He5as iVbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700790511; x=1700876911; bh=LXyAOwjjde0ByZ9X1DEhA7dY4ff5w8COeOt bRqSP8vg=; b=jYGZRnb3loPFsO7oIZa6c+7DpFES3Hkd7fWkz5bKhkh6p+GZBrE 8i/nVMl8eItIqi486wZgJxdbaJXrD7xtiptOcFjC4vW7t2PPFBNrScfD6220o01g VZTPRqdmVk4Zte45ww2kVEm6SdltYt2bJSnQp5dOVJ2ulCuw/AuKHaIMLWiNIXfy BVELY3H1AJoDHzM3FrfnYTToAlJzXmN2/Kjph31aZt5Dh3t+mlidMcHp0omx5aI5 kHF9yEkbXN7fDAxuE4y+R/voMWx1duOJAqsTqx4C9AKQ4ZUrJYQTjVTJfbexPopZ bZp75RCKiygMFKrpgZGCx3mURi7CB7cT8+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehgedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghr vghkucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesih hnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpefg ueduhefgvdefheehudejheefudevueeghfekhfehleegveduteeuiedugffgffenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgv khesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v4 3/6] automation: prevent QEMU access to /dev/mem in PCI passthrough tests Date: Fri, 24 Nov 2023 02:47:07 +0100 Message-ID: <5c7cf4c680200c37187b90eebc49f600865c65ec.1700790421.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 /dev/mem access doesn't work in dom0 in lockdown and in stubdomain. Simulate this environment with removing /dev/mem device node. Full test for lockdown and stubdomain will come later, when all requirements will be in place. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini --- This can be applied only after QEMU change is committed. Otherwise the test will fail. --- automation/scripts/qubes-x86-64.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index d81ed7b931cf..7eabc1bd6ad4 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -163,6 +163,8 @@ ifconfig eth0 up ifconfig xenbr0 up ifconfig xenbr0 192.168.0.1 +# ensure QEMU wont have access /dev/mem +rm -f /dev/mem # get domU console content into test log tail -F /var/log/xen/console/guest-domU.log 2>/dev/null | sed -e \"s/^/(domU) /\" & xl create /etc/xen/domU.cfg