xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 4/4] arm: kill a guest which uses hvc with an immediate operand != XEN_HYPERCALL_TAG
Date: Wed, 25 Jul 2012 14:44:01 +0000	[thread overview]
Message-ID: <1343227442-2781-4-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1343224660.18971.97.camel@zakaz.uk.xensource.com>

At best these guests are confused/broken and at worse they are malicious. In
any case we don't know that they are expecting to handle a -errno style error.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/traps.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 7b12832..c2f3135 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -475,12 +475,7 @@ static void do_trap_hypercall(struct cpu_user_regs *regs, unsigned long iss)
 #endif
 
     if ( iss != XEN_HYPERCALL_TAG )
-    {
-        printk("%s %d: received an alien hypercall iss=%lx\n", __func__ ,
-                __LINE__ , iss);
-        regs->r0 = -EINVAL;
-        return;
-    }
+        domain_crash_synchronous();
 
     if ( regs->r12 > ARRAY_SIZE(arm_hypercall_table) )
     {
-- 
1.7.9.1

  parent reply	other threads:[~2012-07-25 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 13:57 [PATCH 0/4] arm: hypercall handling improvements Ian Campbell
2012-07-25 14:43 ` [PATCH 1/4] arm: clobber only argument registers Ian Campbell
2012-07-25 15:15   ` Stefano Stabellini
2012-07-25 14:43 ` [PATCH 2/4] arm: add bounds check on hypercall array Ian Campbell
2012-07-25 15:16   ` Stefano Stabellini
2012-07-25 15:21     ` Ian Campbell
2012-07-25 15:40       ` Stefano Stabellini
2012-07-25 14:44 ` [PATCH 3/4] arm: implement hypercall continuations Ian Campbell
2012-07-25 15:45   ` Stefano Stabellini
2012-07-25 14:44 ` Ian Campbell [this message]
2012-07-25 16:42 ` [PATCH 0/4] arm: hypercall handling improvements Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343227442-2781-4-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).