From patchwork Mon Apr 25 20:07:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Fleming X-Patchwork-Id: 66615 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1233432qge; Mon, 25 Apr 2016 13:08:49 -0700 (PDT) X-Received: by 10.66.227.229 with SMTP id sd5mr51730349pac.115.1461614927515; Mon, 25 Apr 2016 13:08:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id px5si8638929pab.182.2016.04.25.13.08.47; Mon, 25 Apr 2016 13:08:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965122AbcDYUIl (ORCPT + 29 others); Mon, 25 Apr 2016 16:08:41 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36474 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933368AbcDYUI2 (ORCPT ); Mon, 25 Apr 2016 16:08:28 -0400 Received: by mail-wm0-f45.google.com with SMTP id v188so111856255wme.1 for ; Mon, 25 Apr 2016 13:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X50oteI3WI8eZNpRjoWjGhCT0jkI1sbOkcmTnCr88qo=; b=mT3sVcM5H5d4l2/yVy2nYmDojYbQetpZ6cx8Za90c3/E7U2HcpScnqF35I0qWV3t5E xA7PFE8kXZwrJ3Kk8JdQRnnfnG522jTSPH78sxjwpFecO/f2t+XJGvow8jOUDnLo/9BH UPZin+fpL6I9Oqt3SwSGc7GZqRLj4IL8WhdsBVk9sdwVb0piZPFHuFTop3Lyrdl1d2F1 JTicKvO4udvc5mdgcRe9ZLQSGvPHx2BW1oskGwp1XFBUqXGhDi7CdUjNtZaz4aOVx5rQ MR0XY4pDk4x5sPaD+aM9qSVixKdg6cUPKQAMlhW+ZQ0IAGceZORuDFRGxBiphKhfnx7B wX9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X50oteI3WI8eZNpRjoWjGhCT0jkI1sbOkcmTnCr88qo=; b=kjAovMxAyOXEeIkd0F07EIRZow9ZsuE7ubS3gsiUUKwGLvvJjL1NofBlNTk9D/5x+N vWNH5z1pvAp+1jzHZKkPBkLYSTzZMv+zv+dgRiwXrbIXypfJ3Guw1kifrkWQKAoeohh/ pnxMOPhkcm9e7LGTXN2DjTICbD8k4jtKheTpNSC9MCYBhGhez5eFMAojfNM6R4eH/ID4 wtewlwCqXLJMAnT6CHTbAilRGvZXlHq0MSlFq2/Wr1yFO71chwRKBBn2Qog6tdpOGlrs 1R3lI8zLVsi7hdea6zytQDaTWliXTbQRJFNgXshW4RG/xserlgqSxLdq4/h0UrV7wn28 ufoQ== X-Gm-Message-State: AOPr4FUqwgGW6T/ZL9gNEB9eK+2qrO+TeG2NT1F4FOhLT0MGxaEXv8P+1VLG5yBC0vCSDQ== X-Received: by 10.28.45.129 with SMTP id t123mr14100864wmt.71.1461614907205; Mon, 25 Apr 2016 13:08:27 -0700 (PDT) Received: from localhost (bcdc58e5.skybroadband.com. [188.220.88.229]) by smtp.gmail.com with ESMTPSA id ki9sm25249271wjb.37.2016.04.25.13.08.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Apr 2016 13:08:26 -0700 (PDT) From: Matt Fleming To: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Mark Rutland , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Matt Fleming , Catalin Marinas , Dan Williams , Leif Lindholm , Russell King , Will Deacon Subject: [PATCH 37/40] arm64/efi: Enable runtime call flag checking Date: Mon, 25 Apr 2016 21:07:09 +0100 Message-Id: <1461614832-17633-38-git-send-email-matt@codeblueprint.co.uk> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1461614832-17633-1-git-send-email-matt@codeblueprint.co.uk> References: <1461614832-17633-1-git-send-email-matt@codeblueprint.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland Define ARCH_EFI_IRQ_FLAGS_MASK for arm64, which will enable the generic runtime wrapper code to detect when firmware erroneously modifies flags over a runtime services function call. Signed-off-by: Mark Rutland Acked-by: Will Deacon Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Leif Lindholm Cc: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org Cc: "H. Peter Anvin" Cc: Russell King Cc: Thomas Gleixner Cc: Dan Williams Signed-off-by: Matt Fleming --- arch/arm64/include/asm/efi.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.3 diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index cfd4ae2e46c0..622db3c6474e 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #ifdef CONFIG_EFI @@ -35,6 +36,8 @@ int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md); kernel_neon_end(); \ }) +#define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT) + /* arch specific definitions used by the stub code */ /*