From: Ian Campbell Subject: Re: [PATCH] arm: implement hypercall continuations Date: Fri, 20 Jul 2012 14:23:43 +0100 Message-ID: <1342790623.26734.111.camel@zakaz.uk.xensource.com> References: <1342690554-30561-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org > > + for ( i = 0; *p != '\0'; i++ ) > > + { > > + arg = next_arg(p, args); > > + > > + switch ( i ) > > + { > > + case 0: regs->r0 = arg; break; > > wrong alignment I had rc = arg and lined it up then chaned it back without realigning, thanks for pointing it out. > > @@ -462,17 +469,18 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code) > > > > static void do_trap_hypercall(struct cpu_user_regs *regs, unsigned long iss) > > { > > - arm_hypercall_t *call = NULL; > > + arm_hypercall_fn_t call = NULL; > > > > if ( iss != XEN_HYPERCALL_TAG ) > > + domain_crash_synchronous(); > > Why did you change the behavior of the iss != XEN_HYPERCALL_TAG case? I just noticed it while adding the bounds check. A guest which makes a hypercall with the wrong tag is either malicious or about to fail horribly, there's no reason to allow them to keep living. Ian.