From patchwork Wed Mar 13 15:16:09 2024 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: 13591524 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 E8E5EC54E67 for ; Wed, 13 Mar 2024 15:17:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.692560.1079848 (Exim 4.92) (envelope-from ) id 1rkQLq-0006eK-2b; Wed, 13 Mar 2024 15:17:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 692560.1079848; Wed, 13 Mar 2024 15:17:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rkQLp-0006e2-VZ; Wed, 13 Mar 2024 15:17:05 +0000 Received: by outflank-mailman (input) for mailman id 692560; Wed, 13 Mar 2024 15:17:03 +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 1rkQLn-0005e0-QN for xen-devel@lists.xenproject.org; Wed, 13 Mar 2024 15:17:03 +0000 Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bdc0fcfa-e14c-11ee-a1ee-f123f15fe8a2; Wed, 13 Mar 2024 16:17:02 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 103E411400FA; Wed, 13 Mar 2024 11:17:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 13 Mar 2024 11:17:01 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 11:16:59 -0400 (EDT) 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: bdc0fcfa-e14c-11ee-a1ee-f123f15fe8a2 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:subject :subject:to:to; s=fm1; t=1710343021; x=1710429421; bh=hZ6VYL08E0 Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=DtCO9B0Weh6roG52LY1gbplx+E pOHVHU3cIwZxGbAk67lMYRoZqPOKa5HpnoX0+DOkBBOXXqAuj1JEYNtJ8nAwkrGf MtQbKFbsA5vG4n4uczfKmbqco5URvdWXnnlrHB7dGUEbN1+gc34kmkD+6eVztq9l jqf5F27Q6V/8gwk1ciC6r+idj4LKELarJnGrBC7hKS9cOngLl1XtHVbjKdk25IoD HIgdk5tdVq6FHiN0eLYQTGH2qSwXjKq7t1usUiKK1X9Z80L0mEGW6T8svBfFkfcB GB5+Z84X/xZ08dcq+sDj+o7bSRz5PEdEeBX/70n+AgGzJz9mAK8PRQpkwxNQ== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710343021; x= 1710429421; bh=hZ6VYL08E0Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=X ip+AMW2NM5y535jgAklSMHFg8JKlfSPzv51c0gaL6qnf/pxO/4p7D9LcvBP/pF8m V6DbccH1hLj01GXmdELnpv5CjZ5vGH2oyRLqrRM5phBW/S6QJLQo1XrUTURxQTfA m/dNjfvOjdyViLq/6Z75zkvKgtgfBnq198JfWBLhAeKYEBOD1JIA9KRzUI7+S6Mn J+c353aAXSAolhZH0Q62h/oK3bX0SuI3s7GtT1Zh4IzSVXtVKMHHlsGKP9kAKRPl g9r9+FrWca1amYbE4afeQlgjlVYPA2VslWHQREK/ZFmgpZoIaQnkmELXJGaGRhmF BFxQ7ZTE6SrTclzRFwswg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepgfeu udehgfdvfeehhedujeehfeduveeugefhkefhheelgeevudetueeiudfggfffnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghk sehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh 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?= , Stefano Stabellini , Doug Goldstein Subject: [PATCH v5 4/7] automation: prevent QEMU access to /dev/mem in PCI passthrough tests Date: Wed, 13 Mar 2024 16:16:09 +0100 Message-ID: <2ba54ff3f9021d5790a3bfccb27468c18fadc6bf.1710342968.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.43.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