linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: linux-efi@vger.kernel.org
Cc: mingo@kernel.org, x86@kernel.org, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 3/3] efi/x86: disallow efi=old_map in mixed mode
Date: Sat, 18 Jan 2020 17:57:05 +0100	[thread overview]
Message-ID: <20200118165705.16544-4-ardb@kernel.org> (raw)
In-Reply-To: <20200118165705.16544-1-ardb@kernel.org>

Before commit ... ("efi/x86: limit EFI old memory map to SGI UV
machines"), enabling the old EFI memory map on mixed mode systems
disabled EFI runtime services altogether. Given that efi=old_map is
a debug feature designed to work around firmware problems related
to EFI runtime services, and disabling them can be achieved more
straightforwardly using 'noefi' or 'efi=noruntime', it makes more
sense to ignore efi=old_map on mixed mode systems.

Currently, we do neither, and try to use the old memory map in
combination with mixed mode routines, which results in crashes,
so let's fix this by making efi=old_map functional on native
systems only.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/x86/platform/uv/bios_uv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index 7c2b8c5d0b49..607f58147311 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -371,7 +371,7 @@ static int __init arch_parse_efi_cmdline(char *str)
 		return -EINVAL;
 	}
 
-	if (parse_option_str(str, "old_map"))
+	if (!efi_is_mixed() && parse_option_str(str, "old_map"))
 		set_bit(EFI_UV1_MEMMAP, &efi.flags);
 
 	return 0;
-- 
2.17.1


  parent reply	other threads:[~2020-01-18 16:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18 16:57 [PATCH 0/3] EFI fixes for -next Ard Biesheuvel
2020-01-18 16:57 ` [PATCH 1/3] efi/x86: avoid KASAN false positives when accessing the 1:1 mapping Ard Biesheuvel
2020-01-18 16:57 ` [PATCH 2/3] x86/boot/compressed: relax sed symbol type regex for LLVM ld.lld Ard Biesheuvel
2020-01-21 22:24   ` Nick Desaulniers
2020-01-18 16:57 ` Ard Biesheuvel [this message]
     [not found] ` <20200120094856.GA102981@gmail.com>
2020-01-20 10:01   ` [PATCH 0/3] EFI fixes for -next Ard Biesheuvel
2020-01-20 10:10     ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200118165705.16544-4-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).