From patchwork Tue May 7 12:44:03 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: 13656797 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 15F8EC25B76 for ; Tue, 7 May 2024 12:45:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.718066.1120593 (Exim 4.92) (envelope-from ) id 1s4KBo-0003qb-7K; Tue, 07 May 2024 12:45:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 718066.1120593; Tue, 07 May 2024 12:45:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s4KBo-0003qS-47; Tue, 07 May 2024 12:45:00 +0000 Received: by outflank-mailman (input) for mailman id 718066; Tue, 07 May 2024 12:44:58 +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 1s4KBm-00037i-CO for xen-devel@lists.xenproject.org; Tue, 07 May 2024 12:44:58 +0000 Received: from wfout4-smtp.messagingengine.com (wfout4-smtp.messagingengine.com [64.147.123.147]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9b1d384d-0c6f-11ef-b4bb-af5377834399; Tue, 07 May 2024 14:44:56 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id CE04A1C000B3; Tue, 7 May 2024 08:44:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 07 May 2024 08:44:55 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 May 2024 08:44:53 -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: 9b1d384d-0c6f-11ef-b4bb-af5377834399 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=fm3; t=1715085894; x=1715172294; bh=hZ6VYL08E0 Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=E7AzwpSCa7RJFAipYDZ3jCQw8U jjxqm4GQB2I/bfs42ihOCBTLat9qrYlxXOMjR8bQlWdnKseCAhsSadphICOrCrdN BjHUbzEMXOzMlpymCmT/n6Lwc3+Q90JK8n8zBqcMgJKDdLv/haysg/er7n+Go+Ya wLr/ZQVRHGFOoFa0E04VOEN3GLu003xNOq//1iZio/KXnk9jIkQ5oZ+xxSoWrpRm kXGgYPJaYHENFt1F+sVtEzhRDyJdmln5DZvNxOnFUG7FsBUBHZda7gS/99nFB2yJ wRiIl7Im7o3GKVVMMNcRwI/00ZZa30h8Agf/P49lSmV+JbKVqAIRw695vDhA== 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=fm3; t=1715085894; x= 1715172294; bh=hZ6VYL08E0Yxr0n/W2twXlHVhmqK+fKxAH0QY/uH+Wo=; b=R 6Kgq3hm3cCwJhJ/y8diYXiEPrwDuROJuZo0xnozeKI5rqLeIS9tDH7bsgWvv3fIW 8cVSDVAD/d57rUYl24DXXaS19oOHirqhSPdIy9nTvoQwT3oaIxh9a5NVLyWvmvl7 OFHWlO2j4EarZasWgk20o6E3s1aBmuIzz6vS70jeFBOkWH9DEKeZmIW6BKhilXv8 DOtjU/wb3et5DstvmN6uavRFvu6An3DIyk47MrCSoSAP3J9KfvZLSBb5IInzJGK3 09lHBlfSnjNZqSVggqiwdgSC8zaSB56eRghNdKxdCVLDFAT+K2LYRw7FGx6wDLRo mO7dLDT/QSp9QuzIY0YsQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvkedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghr vghkucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesih hnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpefg ueduhefgvdefheehudejheefudevueeghfekhfehleegveduteeuiedugffgffenucevlh hushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgv 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?= , Stefano Stabellini , Doug Goldstein Subject: [PATCH v7 3/6] automation: prevent QEMU access to /dev/mem in PCI passthrough tests Date: Tue, 7 May 2024 14:44:03 +0200 Message-ID: <2b6ed802c83f7e6d7d03437b8ecc693628f85651.1715085837.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.44.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