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-caef78b6cdeddf4ad364f95910bba6b43b8eb9bf@git.kernel.org>
Date:   Thu, 20 Oct 2016 22:48:56 -0700
From:   tip-bot for Alex Thorlton <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     travis@....com, peterz@...radead.org, ard.biesheuvel@...aro.org,
        brgerst@...il.com, luto@...nel.org, athorlton@....com,
        yamada.masahiro@...ionext.com, tglx@...utronix.de, rja@....com,
        matt@...eblueprint.co.uk, sivanich@....com, hpa@...or.com,
        torvalds@...ux-foundation.org, jpoimboe@...hat.com,
        linux-kernel@...r.kernel.org, bp@...en8.de, dvlasenk@...hat.com,
        mingo@...nel.org
Subject: [tip:x86/urgent] x86/platform/UV: Fix support for EFI_OLD_MEMMAP
 after BIOS callback updates

Commit-ID:  caef78b6cdeddf4ad364f95910bba6b43b8eb9bf
Gitweb:     http://git.kernel.org/tip/caef78b6cdeddf4ad364f95910bba6b43b8eb9bf
Author:     Alex Thorlton <athorlton@....com>
AuthorDate: Wed, 19 Oct 2016 20:48:51 -0500
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 20 Oct 2016 08:47:58 +0200

x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates

Some time ago, we brought our UV BIOS callback code up to speed with the
new EFI memory mapping scheme, in commit:

    d1be84a232e3 ("x86/uv: Update uv_bios_call() to use efi_call_virt_pointer()")

By leveraging some changes that I made to a few of the EFI runtime
callback mechanisms, in commit:

    80e75596079f ("efi: Convert efi_call_virt() to efi_call_virt_pointer()")

This got everything running smoothly on UV, with the new EFI mapping
code.  However, this left one, small loose end, in that EFI_OLD_MEMMAP
(a.k.a. efi=old_map) will no longer work on UV, on kernels that include
the aforementioned changes.

At the time this was not a major issue (in fact, it still really isn't),
but there's no reason that EFI_OLD_MEMMAP *shouldn't* work on our
systems.  This commit adds a check into uv_bios_call(), to see if we have
the EFI_OLD_MEMMAP bit set in efi.flags.  If it is set, we fall back to
using our old callback method, which uses efi_call() directly on the __va()
of our function pointer.

Signed-off-by: Alex Thorlton <athorlton@....com>
Acked-by: Matt Fleming <matt@...eblueprint.co.uk>
Cc: <stable@...r.kernel.org> # v4.7 and later
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Dimitri Sivanich <sivanich@....com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Mike Travis <travis@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Russ Anderson <rja@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Link: http://lkml.kernel.org/r/1476928131-170101-1-git-send-email-athorlton@sgi.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/platform/uv/bios_uv.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index b4d5e95..4a6a5a2 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -40,7 +40,15 @@ s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5)
 		 */
 		return BIOS_STATUS_UNIMPLEMENTED;
 
-	ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
+	/*
+	 * If EFI_OLD_MEMMAP is set, we need to fall back to using our old EFI
+	 * callback method, which uses efi_call() directly, with the kernel page tables:
+	 */
+	if (unlikely(test_bit(EFI_OLD_MEMMAP, &efi.flags)))
+		ret = efi_call((void *)__va(tab->function), (u64)which, a1, a2, a3, a4, a5);
+	else
+		ret = efi_call_virt_pointer(tab, function, (u64)which, a1, a2, a3, a4, a5);
+
 	return ret;
 }
 EXPORT_SYMBOL_GPL(uv_bios_call);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ