From patchwork Tue Sep 9 16:23:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 37138 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BCB3D20566 for ; Tue, 9 Sep 2014 16:25:50 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id vb8sf83774115obc.0 for ; Tue, 09 Sep 2014 09:25:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=9qDT9wHk557a3MACCIWwAW4ZG6Y37DmyqwKnD3UIuIU=; b=XskvvfxwTK3D1EhBVXwLZKvnVIG7FtOkFWV4s02TxBQegU9ers87mCPGiBQ9blGGbv OFhPYS9EAitM0FCgSs7cwoW5gJpkry87nDyUBm/5pFrHDoNoDqHwM5pTpni2BWdVfN09 Bal4Jv+yolAhOKZAURNzLCikH5SnPfqjvkQwtXohmA/0naJlqw/bancT5j8+cRXTEoaX hwtrJJWzj2cH6n3f6UDZ8y5rxdAVM+QKmbVAJa266uyr9jWld/1cfKdYIYTFSNAKyKpu JER1neW6HT4dMzhP0Ty4Tjuay33bXnchU1DzZS0Iqw3bwoeBibgCPUodCzYbtw+k9Wr8 ry3Q== X-Gm-Message-State: ALoCoQmWIroPDLF/ySFv74Y8ojeXzTZbWc6PtNWD3DPFfxmgaWtHzyDLS7G4r4U2nDfXCq8NsLYx X-Received: by 10.182.186.4 with SMTP id fg4mr14719614obc.9.1410279950159; Tue, 09 Sep 2014 09:25:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.100 with SMTP id l91ls2190740qge.69.gmail; Tue, 09 Sep 2014 09:25:50 -0700 (PDT) X-Received: by 10.53.2.10 with SMTP id bk10mr6467981vdd.48.1410279950054; Tue, 09 Sep 2014 09:25:50 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id l1si5355534vca.33.2014.09.09.09.25.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 09:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ij19so3517155vcb.40 for ; Tue, 09 Sep 2014 09:25:50 -0700 (PDT) X-Received: by 10.220.187.134 with SMTP id cw6mr1587001vcb.71.1410279949970; Tue, 09 Sep 2014 09:25:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp310250vcb; Tue, 9 Sep 2014 09:25:49 -0700 (PDT) X-Received: by 10.180.91.101 with SMTP id cd5mr31680852wib.41.1410279949071; Tue, 09 Sep 2014 09:25:49 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id l3si17857397wjy.97.2014.09.09.09.25.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 09 Sep 2014 09:25:49 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XROCq-0003Lg-Ej; Tue, 09 Sep 2014 16:23:48 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XROCo-0003LI-Qb for xen-devel@lists.xen.org; Tue, 09 Sep 2014 16:23:46 +0000 Received: from [85.158.139.211:51121] by server-14.bemta-5.messagelabs.com id E5/53-12422-2992F045; Tue, 09 Sep 2014 16:23:46 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1410279819!8114148!4 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10409 invoked from network); 9 Sep 2014 16:23:45 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 9 Sep 2014 16:23:45 -0000 X-IronPort-AV: E=Sophos;i="5.04,492,1406592000"; d="scan'208";a="170606730" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Tue, 9 Sep 2014 12:23:18 -0400 Received: from drall.uk.xensource.com ([10.80.16.71]) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1XROCL-0001uf-AN; Tue, 09 Sep 2014 17:23:18 +0100 Received: by drall.uk.xensource.com (sSMTP sendmail emulation); Tue, 09 Sep 2014 17:23:17 +0100 From: Ian Campbell To: Date: Tue, 9 Sep 2014 17:23:08 +0100 Message-ID: <1410279788-27167-9-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1410279730.8217.238.camel@kazak.uk.xensource.com> References: <1410279730.8217.238.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH 9/9] xen: arm: Allow traps from 32 bit userspace on 64 bit hypervisors again X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: This removes the unconditional #undef injected in response to such traps which was added by the fixes to CVE-2014-5147 / XSA-102 in c0020e099702 "xen: arm: Handle traps from 32-bit userspace on 64-bit kernel as undef", we now handle such traps correctly. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 78017db..7118a8c 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1953,17 +1953,6 @@ asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs) enter_hypervisor_head(regs); - /* - * We currently do not handle 32-bit userspace on 64-bit kernels - * correctly (See XSA-102). Until that is resolved we treat any - * trap from 32-bit userspace on 64-bit kernel as undefined. - */ - if ( is_64bit_domain(current->domain) && psr_mode_is_32bit(regs->cpsr) ) - { - inject_undef_exception(regs, hsr.len); - return; - } - switch (hsr.ec) { case HSR_EC_WFI_WFE: if ( !check_conditional_instr(regs, hsr) )