lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-21f866257c7027f8f49bfde83f559f9e58f9ee93@git.kernel.org>
Date:	Mon, 27 Jun 2016 06:02:57 -0700
From:	tip-bot for Alex Thorlton <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	sivanich@....com, catalin.marinas@....com, athorlton@....com,
	mingo@...nel.org, linux-kernel@...r.kernel.org,
	matt@...eblueprint.co.uk, hpa@...or.com, linux@...linux.org.uk,
	ard.biesheuvel@...aro.org, torvalds@...ux-foundation.org,
	mark.rutland@....com, roy.franz@...aro.org, rja@....com,
	will.deacon@....com, peterz@...radead.org, tglx@...utronix.de
Subject: [tip:efi/core] x86/efi: Update efi_thunk() to use the the
 arch_efi_call_virt*() macros

Commit-ID:  21f866257c7027f8f49bfde83f559f9e58f9ee93
Gitweb:     http://git.kernel.org/tip/21f866257c7027f8f49bfde83f559f9e58f9ee93
Author:     Alex Thorlton <athorlton@....com>
AuthorDate: Sat, 25 Jun 2016 08:20:29 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 27 Jun 2016 13:06:57 +0200

x86/efi: Update efi_thunk() to use the the arch_efi_call_virt*() macros

Currently, the efi_thunk macro has some semi-duplicated code in it that
can be replaced with the arch_efi_call_virt_setup/teardown macros. This
commit simply replaces the duplicated code with those macros.

Suggested-by: Matt Fleming <matt@...eblueprint.co.uk>
Signed-off-by: Alex Thorlton <athorlton@....com>
Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Dimitri Sivanich <sivanich@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Roy Franz <roy.franz@...aro.org>
Cc: Russ Anderson <rja@....com>
Cc: Russell King <linux@...linux.org.uk>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Will Deacon <will.deacon@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-efi@...r.kernel.org
Link: http://lkml.kernel.org/r/1466839230-12781-7-git-send-email-matt@codeblueprint.co.uk
[ Renamed variables to the standard __ prefix. ]
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/platform/efi/efi_64.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index b226b3f..5cb4301 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -466,22 +466,17 @@ extern efi_status_t efi64_thunk(u32, ...);
 #define efi_thunk(f, ...)						\
 ({									\
 	efi_status_t __s;						\
-	unsigned long flags;						\
-	u32 func;							\
+	unsigned long __flags;						\
+	u32 __func;							\
 									\
-	efi_sync_low_kernel_mappings();					\
-	local_irq_save(flags);						\
+	local_irq_save(__flags);					\
+	arch_efi_call_virt_setup();					\
 									\
-	efi_scratch.prev_cr3 = read_cr3();				\
-	write_cr3((unsigned long)efi_scratch.efi_pgt);			\
-	__flush_tlb_all();						\
+	__func = runtime_service32(f);					\
+	__s = efi64_thunk(__func, __VA_ARGS__);				\
 									\
-	func = runtime_service32(f);					\
-	__s = efi64_thunk(func, __VA_ARGS__);			\
-									\
-	write_cr3(efi_scratch.prev_cr3);				\
-	__flush_tlb_all();						\
-	local_irq_restore(flags);					\
+	arch_efi_call_virt_teardown();					\
+	local_irq_restore(__flags);					\
 									\
 	__s;								\
 })

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ