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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157045975007.9978.12389827950739449033.tip-bot2@tip-bot2>
Date:   Mon, 07 Oct 2019 14:49:10 -0000
From:   "tip-bot2 for Ard Biesheuvel" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Scott Talbert <swt@...hie.net>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        <stable@...r.kernel.org>, Ben Dooks <ben.dooks@...ethink.co.uk>,
        Dave Young <dyoung@...hat.com>,
        Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Jerry Snitselaar <jsnitsel@...hat.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Lukas Wunner <lukas@...ner.de>, Lyude Paul <lyude@...hat.com>,
        Matthew Garrett <mjg59@...gle.com>,
        Octavian Purdila <octavian.purdila@...el.com>,
        Peter Jones <pjones@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-efi@...r.kernel.org, linux-integrity@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
        linux-kernel@...r.kernel.org
Subject: [tip: efi/urgent] efivar/ssdt: Don't iterate over EFI vars if no SSDT
 override was specified

The following commit has been merged into the efi/urgent branch of tip:

Commit-ID:     c05f8f92b701576b615f30aac31fabdc0648649b
Gitweb:        https://git.kernel.org/tip/c05f8f92b701576b615f30aac31fabdc0648649b
Author:        Ard Biesheuvel <ard.biesheuvel@...aro.org>
AuthorDate:    Wed, 02 Oct 2019 18:58:59 +02:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Mon, 07 Oct 2019 15:24:35 +02:00

efivar/ssdt: Don't iterate over EFI vars if no SSDT override was specified

The kernel command line option efivar_ssdt= allows the name to be
specified of an EFI variable containing an ACPI SSDT table that should
be loaded into memory by the OS, and treated as if it was provided by
the firmware.

Currently, that code will always iterate over the EFI variables and
compare each name with the provided name, even if the command line
option wasn't set to begin with.

So bail early when no variable name was provided. This works around a
boot regression on the 2012 Mac Pro, as reported by Scott.

Tested-by: Scott Talbert <swt@...hie.net>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: <stable@...r.kernel.org> # v4.9+
Cc: Ben Dooks <ben.dooks@...ethink.co.uk>
Cc: Dave Young <dyoung@...hat.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc: Jerry Snitselaar <jsnitsel@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Lukas Wunner <lukas@...ner.de>
Cc: Lyude Paul <lyude@...hat.com>
Cc: Matthew Garrett <mjg59@...gle.com>
Cc: Octavian Purdila <octavian.purdila@...el.com>
Cc: Peter Jones <pjones@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Cc: linux-integrity@...r.kernel.org
Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Link: https://lkml.kernel.org/r/20191002165904.8819-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 drivers/firmware/efi/efi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 8d3e778..69f00f7 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -267,6 +267,9 @@ static __init int efivar_ssdt_load(void)
 	void *data;
 	int ret;
 
+	if (!efivar_ssdt[0])
+		return 0;
+
 	ret = efivar_init(efivar_ssdt_iter, &entries, true, &entries);
 
 	list_for_each_entry_safe(entry, aux, &entries, list) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ