[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XTF PATCH v3 3/3] x86: Poison hypercall page with `int3` rather than `ret`


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Mon, 6 Oct 2025 12:25:58 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XsMXiiGH9rBLvTUq/4/suDkB8nbjPOIgBDGiIXrKsHk=; b=p9UKVgyqkaa0n5S0/CXrGRFAl2IUmq4wmR8St4I7/siXXcaR1JeN9x8UJCIMUFiaWEy/G6hJNhQ7SCBnkjrL/6TwwS9CPUPDVaq1d+IJSwTDkcSp8edzJg8LZCX3YhnNyhUAjkz30XSygfRKzxsTTPPReJ//oeCsJmkuf22jMdIWAxHzko+ygBC9ND/Ohbrn73HYHthY2JjF9LNbm6AP1MAdtfnSFZclu2xsDsNVLiVNK07MQoCr0sLjJ4ESllZMwQw85ywOLAVm6coEcJCkUr4GcTG5bPZEeZ6xtrqE186ayjc79c1FyOdj6Ic4G1M1YRQFf3SYPU40WVB4KWljXA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Yvv71YbjrflPt61bq808CArG9Za1bW8/8dXChAHkzUJX92OFcxFY6u/79QFuOBBAfO1nOXgjIN169C4F8n9IktRC0e705qvGM66qId3rHSHnZY/X/Tyq2QW7s9ys+CUN2+PQSXS7MkIZ7+3n2k5tU0UKJj1iwCwjEocqyj94S8rKfd9lOOSQ4Tt3/GbP7bTN8paTkQl8dULpP7KFU9KxigrVEJoMtXBAupM69jomTyfffZMFbAowKRzgQ6EhPK5huXn5TTuGLv8WpbYX1rYW1kRAaa2WMVoMcKTp0OjOetXtho3uNsjBTMsPQhh4KCG9ni05WuhlAcyv/pFqmJ1F1w==
  • Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 06 Oct 2025 10:28:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Making a hypercall with the hypercall page absent should not
have a happy ending. At best it's just weird, but at worst it might
allow an otherwise failing test to pass.

Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
---
`./xtf-runner -a` passes

v3:
  * New patch based on Roger's suggestion
---
 arch/x86/hypercall_page.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/hypercall_page.S b/arch/x86/hypercall_page.S
index cc6ddc2..de0a991 100644
--- a/arch/x86/hypercall_page.S
+++ b/arch/x86/hypercall_page.S
@@ -6,8 +6,8 @@
         .p2align PAGE_SHIFT
 
 GLOBAL(hypercall_page)
-         /* Poisoned with `ret` for safety before hypercalls are set up. */
-        .fill PAGE_SIZE, 1, 0xc3
+         /* Poisoned with `int3` so a stray hypercall is patently clear */
+        .fill PAGE_SIZE, 1, 0xcc
         .type hypercall_page, STT_OBJECT
         .size hypercall_page, PAGE_SIZE
 
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.