From patchwork Thu Dec 4 19:26:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 41950 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5D3132486D for ; Thu, 4 Dec 2014 20:42:40 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf11445527lbd.10 for ; Thu, 04 Dec 2014 12:42:39 -0800 (PST) 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:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:content-type:content-transfer-encoding :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=Z2LTQgae4Jdm6+oy9oxhQXj7X1KUVSlmZM/VooXazdU=; b=drTs+IL/lvRdVkjzcm9NnTt6bRJp5A6hCVofRPSGGF2qvQA6dRCf7iZttlSReUGoSf 5G20nuAMjmKsaTzmIVocqdFcX0BbGqLH1RT/MV572w+B/RT+M3OUJ8K1E23W3adL0psn /JksnMeM+XWbqw0hcWOm5/x33WcszXqwXH/o7DAoGYpdhSl0mwHFgs3rDHXIU00Y4sOW YXkxE9Ci17HGGjsxkkmOtw2VED5gL84F2xw+Maq2QxEsnkzFHEl+q0QE6R35dkHex5IR /D9R+p+G8H47MpjFtq8iBcq3G3qwgbcSVxLvXovLRqHib/jeFDShXoSA07uw2APVN1gR nwCQ== X-Gm-Message-State: ALoCoQl4cla0ci5IJ7JfRkfhkMDHhKMVbh/Dx200QAIF+RtYaT7OS+AlhuGZvUkjr86mqUT55o2E X-Received: by 10.112.138.234 with SMTP id qt10mr2674829lbb.4.1417725759314; Thu, 04 Dec 2014 12:42:39 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.9 with SMTP id w9ls324396law.1.gmail; Thu, 04 Dec 2014 12:42:39 -0800 (PST) X-Received: by 10.112.27.133 with SMTP id t5mr11371423lbg.45.1417725759039; Thu, 04 Dec 2014 12:42:39 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id ti8si8311604lbb.95.2014.12.04.12.42.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 12:42:38 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id f15so15662202lbj.41 for ; Thu, 04 Dec 2014 12:42:38 -0800 (PST) X-Received: by 10.153.7.170 with SMTP id dd10mr11296134lad.44.1417725758915; Thu, 04 Dec 2014 12:42:38 -0800 (PST) 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.112.184.201 with SMTP id ew9csp107640lbc; Thu, 4 Dec 2014 12:42:36 -0800 (PST) X-Received: by 10.107.135.163 with SMTP id r35mr11528783ioi.25.1417725756041; Thu, 04 Dec 2014 12:42:36 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id y74si14926284iod.20.2014.12.04.12.42.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Dec 2014 12:42:36 -0800 (PST) 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 1Xwc3T-00088n-Tf; Thu, 04 Dec 2014 19:27:11 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xwc3S-00088i-25 for xen-devel@lists.xenproject.org; Thu, 04 Dec 2014 19:27:10 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 71/A0-28865-D85B0845; Thu, 04 Dec 2014 19:27:09 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-7.tower-206.messagelabs.com!1417721225!11670461!1 X-Originating-IP: [209.85.212.170] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 11017 invoked from network); 4 Dec 2014 19:27:05 -0000 Received: from mail-wi0-f170.google.com (HELO mail-wi0-f170.google.com) (209.85.212.170) by server-7.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 4 Dec 2014 19:27:05 -0000 Received: by mail-wi0-f170.google.com with SMTP id bs8so37219571wib.3 for ; Thu, 04 Dec 2014 11:27:05 -0800 (PST) X-Received: by 10.194.178.231 with SMTP id db7mr18087059wjc.112.1417721225553; Thu, 04 Dec 2014 11:27:05 -0800 (PST) Received: from chilopoda.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id gl5sm43037768wib.0.2014.12.04.11.27.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Dec 2014 11:27:04 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 4 Dec 2014 19:26:55 +0000 Message-Id: <1417721215-32639-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.3 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32 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: , MIME-Version: 1.0 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: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 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: A 0 was forgotten when the arm32 BUG instruction opcode has been added in commit 3e802c6ca1fb9a9549258c2855a57cad483f3cbd "xen/arm: Correctly support WARN_ON". This will result to use a valid instruction (mcreq 0, 3, r0, cr15, cr0, {7}), and inhibit usage of BUG/WARN_ON and co. Signed-off-by: Julien Grall --- Not sure, why I dropped the 0 when I implemented the patch... This is a bug fixed for Xen 4.5. This is only affected ARM32 where the BUG opcode was malformed. With the malformed opcode, the ASSERT/BUG_ON is skipped and the processor may execute another patch (because the compiler has optimized due the unreachable in both macro). The code modified is only executed when Xen is in bad state. --- xen/include/asm-arm/arm32/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-arm/arm32/bug.h b/xen/include/asm-arm/arm32/bug.h index 155b420..3e66f35 100644 --- a/xen/include/asm-arm/arm32/bug.h +++ b/xen/include/asm-arm/arm32/bug.h @@ -6,7 +6,7 @@ /* ARMv7 provides a list of undefined opcode (see A8.8.247 DDI 0406C.b) * Use one them encoding A1 to go in exception mode */ -#define BUG_OPCODE 0xe7f00f0 +#define BUG_OPCODE 0xe7f000f0 #define BUG_INSTR ".word " __stringify(BUG_OPCODE)