Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp406079pxu; Tue, 1 Dec 2020 14:27:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrYBr9MWAYm1JMLV5X1duLQNvYAywTgiAfJFChViai0Sew3Z/COi5pnUGFMyAbghnAg69e X-Received: by 2002:a50:d78f:: with SMTP id w15mr5235766edi.227.1606861646201; Tue, 01 Dec 2020 14:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861646; cv=none; d=google.com; s=arc-20160816; b=fR9O5dXkk/wnV3VdrTEhzFNxLELW5v/p1BeXqRT5uukju6d5xZ8Phu1fKkhUg5zfBh iW/5/LUhRrgvsjQwpEcN2aCDweSEnFkYJDtseBukdVRVO55z0EZES5AKtUN2ohEdPSsg 7g2pcglFOy32I8lVvtZwUrKbjtBVtOhmSUaGcWXoLj5ASjZETkbKU0q0aP0ZZdgVsG3/ bLt0qf682875/B5y5z3XtIM+Y2Ar4tK1XzTyx5Ihj3yXtL5FOLw+O/oPE/WI0xpFweP6 wHTKxebo2NUYC5tmN+XTNC+eLw+XCy0hdiF7pHRwKBWH46SK3odacoqrzMyyboP0py5j Cefg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nH9iFwwxXJwH0Oh33JtXNYY9OMZQNpaMzFZNlzcd/Fs=; b=o8DatrJ7x97AfiG6Lz2wsNHk9bXTWKutyMxln6mfPBB7bpOwfJVQFxDMiFUVNQ7jfe PX/iCfWlLUxwmig6wpRlnE+2WcZErpF71tku7/DS8iNjcdYwSlyAHf6Kj009A+0sw9sz f83SPEOIb2eEILKaju5VO7sheEFQRxytuqxFWNrT+Oc/G08E2E2DQeIdIA0juZIfJ927 cybD6I0DWEVYIfKJgVnbu1sOUNVSkJ/Ujt4hlYwpOMLlrmX0l05QXzbnoIzUs3YplDAv CuKoboKu216gXjTOLqVs228/cdksH1cnBikacl0TU3Q6I6Fs2lwr6vhSElK1dgHKag3Y UKCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OLn5hyDl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ng3si876932ejb.344.2020.12.01.14.27.03; Tue, 01 Dec 2020 14:27:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OLn5hyDl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390042AbgLAJND (ORCPT + 99 others); Tue, 1 Dec 2020 04:13:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:50570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390022AbgLAJM6 (ORCPT ); Tue, 1 Dec 2020 04:12:58 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3EA220809; Tue, 1 Dec 2020 09:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813963; bh=a+sG0RYOjYM8JqKT8I3axdNLLN6AmqISkuuujrt1Weo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OLn5hyDlCKDFDxV66/CsZVYVV3Jb0aV9zHQGKxKlJhuUXq6pYF3+03mPOmOpOsjEl tPEzLaMSIHbC3wOyK8ZpV+6XAEfopssQD4fGBPJ6dI/3mgSF3TDyd4otKfAphhtXJ0 ZMUGjYxw9lOblQFVvstgSdrrmqIPL6qtW7lSbfpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski , Ard Biesheuvel , Sasha Levin Subject: [PATCH 5.9 120/152] efi/efivars: Set generic ops before loading SSDT Date: Tue, 1 Dec 2020 09:53:55 +0100 Message-Id: <20201201084727.513958611@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084711.707195422@linuxfoundation.org> References: <20201201084711.707195422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amadeusz Sławiński [ Upstream commit 50bdcf047503e30126327d0be4f0ad7337106d68 ] Efivars allows for overriding of SSDT tables, however starting with commit bf67fad19e493b ("efi: Use more granular check for availability for variable services") this use case is broken. When loading SSDT generic ops should be set first, however mentioned commit reversed order of operations. Fix this by restoring original order of operations. Fixes: bf67fad19e493b ("efi: Use more granular check for availability for variable services") Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20201123172817.124146-1-amadeuszx.slawinski@linux.intel.com Tested-by: Cezary Rojewski Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin --- drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 3aa07c3b51369..8ead4379e6e85 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -387,10 +387,10 @@ static int __init efisubsys_init(void) if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE | EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) { - efivar_ssdt_load(); error = generic_ops_register(); if (error) goto err_put; + efivar_ssdt_load(); platform_device_register_simple("efivars", 0, NULL, 0); } -- 2.27.0