Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965153AbcDYUIr (ORCPT ); Mon, 25 Apr 2016 16:08:47 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36501 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933534AbcDYUIb (ORCPT ); Mon, 25 Apr 2016 16:08:31 -0400 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 , Ben Hutchings , Catalin Marinas , Christoph Hellwig , Darren Hart , David Herrmann , David Howells , Greg KH , Hannes Reinecke , Ingo Molnar , James Bottomley , Kweh Hock Leong , Leif Lindholm , Peter Jones , Peter Zijlstra , Raphael Hertzog , Russell King , Will Deacon Subject: [PATCH 39/40] x86/efi: Enable runtime call flag checking Date: Mon, 25 Apr 2016 21:07:11 +0100 Message-Id: <1461614832-17633-40-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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1957 Lines: 62 From: Mark Rutland Define ARCH_EFI_IRQ_FLAGS_MASK for x86, which will enable the generic runtime wrapper code to detect when firmware erroneously modifies flags over a runtime services function call. For x86 (both 32-bit and 64-bit), we only need check the interrupt flag. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Catalin Marinas Cc: Leif Lindholm Cc: Russell King Cc: Will Deacon Cc: Greg KH Cc: James Bottomley Cc: David Howells Cc: Harald Hoyer harald@redhat.com Cc: Kweh Hock Leong Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Raphael Hertzog Cc: Ben Hutchings Cc: David Herrmann Cc: Darren Hart Cc: Peter Zijlstra Cc: Peter Jones Signed-off-by: Matt Fleming --- arch/x86/include/asm/efi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index fb085ce00bd2..78d1e7467eae 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -3,6 +3,7 @@ #include #include +#include #include /* @@ -28,8 +29,9 @@ #define MAX_CMDLINE_ADDRESS UINT_MAX -#ifdef CONFIG_X86_32 +#define ARCH_EFI_IRQ_FLAGS_MASK X86_EFLAGS_IF +#ifdef CONFIG_X86_32 extern unsigned long asmlinkage efi_call_phys(void *, ...); -- 2.7.3