Received: by 10.223.176.5 with SMTP id f5csp944679wra; Sat, 3 Feb 2018 14:06:41 -0800 (PST) X-Google-Smtp-Source: AH8x226/LaahtcFJc3lvx454TKhzCjS/+QS+CfVSrYypmT6cHSQvSY3W1lQefLuMErXcxNcIesrO X-Received: by 10.98.94.71 with SMTP id s68mr5432565pfb.135.1517695601811; Sat, 03 Feb 2018 14:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517695601; cv=none; d=google.com; s=arc-20160816; b=nLdd7hQmV8jAKNxv6huJ8xzG/P+IIbfVEyZzWc9Oxc5Bxn83taTXCOThORxnKlv0VN 29aoCrK0zvyboZO+PbmWzOZmRGqpB+b4raCETb/LeSBKGa49bM+SibrTk2x8epvjkz86 5YoZUKdTbxNTsmaXA93Q+1TcC5F36ubjxJ/HOQNBL1OvYTgtyb5szIZkJ/GbjJicfu4f dwyOPFKrFJrTt6uvEZdRHEEZKIKaXKOoUtJXvFg8RaQHu+mdQaJNlqyujSWfMhESJSDz /wY7r4B0MCV0mcnsrKSv2lICUk51gZKXhQsVrQeCTxjHt2ThsLYPkNMumeY2IhGfsmuN YP4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Ccdk0iZal9G8f3ZiJwWSZ2FBpZAhuvYxMicuMGbJ63w=; b=Ulp0Ql+AR8DJjrnoh1bcmdVMoqwtSVlWedJ69CbiIuNKb8qB3cEaL5MFMs7y1THLM9 MmM+hqG1/PTO539dL6aA763dF2mkUn9s8txT9IagCTbOcmSR9PNZ1iHkIMHMk3cGxWEV QaPED6QnBx01andBP5WfQeGK/OHeRubsckn1LHaRnxX00xEc2PnzACQkbWt3EyipfM5k 1Sdq9iBrJggn0kYXb7OEXneC5rnJulLBTZUTMPPZg/OnZz5NRAD4KCN1HMNk3opDEuZ7 z+6MPOFVCpNhaZhLthpkMaqus9NzVaiwE2ESWgbgEO4y1OrXXonpJL4+cM2Ho5YYSdvy CGKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=m2jT3wR9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si4249495pfb.353.2018.02.03.14.06.27; Sat, 03 Feb 2018 14:06:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=m2jT3wR9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755228AbeBCSoA (ORCPT + 99 others); Sat, 3 Feb 2018 13:44:00 -0500 Received: from mail-bl2nam02on0109.outbound.protection.outlook.com ([104.47.38.109]:45293 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753183AbeBCSC7 (ORCPT ); Sat, 3 Feb 2018 13:02:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ccdk0iZal9G8f3ZiJwWSZ2FBpZAhuvYxMicuMGbJ63w=; b=m2jT3wR9DzCQB+rqT13Lh/zIGz8F5WdA4bxOUgkuwnbsSdV7vSOEC/P0a4TFHpTXkOBGPFzzisKXgNx4I8eSvoPJ355d8ZJCGdXhqmADUb0qsUpoAtc17SroLWGoNFv7E/FHl0XQMrZcRCAs4Tsx9Cc16UI7fieJrgKgUSYBIzs= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB1041.namprd21.prod.outlook.com (52.132.23.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.506.3; Sat, 3 Feb 2018 18:02:12 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:02:12 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Dave Young , Matt Fleming , Ard Biesheuvel , Bryan O'Donoghue , Ge Song , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , "linux-efi@vger.kernel.org" , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 082/110] x86/efi: Fix kernel param add_efi_memmap regression Thread-Topic: [PATCH AUTOSEL for 4.14 082/110] x86/efi: Fix kernel param add_efi_memmap regression Thread-Index: AQHTnRj/b5DUJfk11kK0uVHzv31RMQ== Date: Sat, 3 Feb 2018 18:01:21 +0000 Message-ID: <20180203180015.29073-82-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB1041;7:5toZZz7FGnNXoHmCfy6W+jc7S/xqXqyIWMZuhBNMRTS9VR3fZy9zTdX2UUFYcLplcvCzygUTg3n+cTPOQG1L/IPosh1fMfI53/+LnMlLOXgyqczmlSF9prELvVvjPpujvbek9TnTki0qhbKWXGSJqYwr38OQVi2XFDRikLPlsJemoh0E28QYs2Lcj5uapLukUviIQtG8ruAV+zPpI7f+cMh1/iM4GsU0F3cI0FtotTvQJsvglCBbSCK7pwrTGhAu x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: cca5785f-733a-490c-0528-08d56b30404e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB1041; x-ms-traffictypediagnostic: BL0PR2101MB1041: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(42068640409301); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:BL0PR2101MB1041;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB1041; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(396003)(366004)(39860400002)(376002)(346002)(189003)(199004)(2501003)(305945005)(3660700001)(5250100002)(81156014)(99286004)(81166006)(36756003)(7736002)(10290500003)(106356001)(7416002)(53936002)(5660300001)(316002)(22452003)(8936002)(54906003)(110136005)(3280700002)(478600001)(72206003)(966005)(4326008)(25786009)(107886003)(102836004)(97736004)(76176011)(59450400001)(6666003)(66066001)(6506007)(2950100002)(2900100001)(68736007)(8676002)(6116002)(3846002)(186003)(1076002)(6346003)(105586002)(26005)(10090500001)(2906002)(6512007)(86612001)(14454004)(6306002)(86362001)(6436002)(6486002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB1041;H:BL0PR2101MB1027.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: +McDqsL+f+SjVyGVYd2r5L4mc5BvZGDndEEcE44LZMgHOhvanESPRAiHklK1AHbTAZ1FoUfCI/XemrGdvaSYdg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: cca5785f-733a-490c-0528-08d56b30404e X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:01:21.8159 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1041 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Young [ Upstream commit 835bcec5fdf3f9e880111b482177e7e70e3596da ] 'add_efi_memmap' is an early param, but do_add_efi_memmap() has no chance to run because the code path is before parse_early_param(). I believe it worked when the param was introduced but probably later some other changes caused the wrong order and nobody noticed it. Move efi_memblock_x86_reserve_range() after parse_early_param() to fix it. Signed-off-by: Dave Young Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Bryan O'Donoghue Cc: Ge Song Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180102172110.17018-2-ard.biesheuvel@linaro= .org Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/kernel/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index e84cb4c75cd0..c54361a22f59 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -928,9 +928,6 @@ void __init setup_arch(char **cmdline_p) set_bit(EFI_BOOT, &efi.flags); set_bit(EFI_64BIT, &efi.flags); } - - if (efi_enabled(EFI_BOOT)) - efi_memblock_x86_reserve_range(); #endif =20 x86_init.oem.arch_setup(); @@ -984,6 +981,8 @@ void __init setup_arch(char **cmdline_p) =20 parse_early_param(); =20 + if (efi_enabled(EFI_BOOT)) + efi_memblock_x86_reserve_range(); #ifdef CONFIG_MEMORY_HOTPLUG /* * Memory used by the kernel cannot be hot-removed because Linux --=20 2.11.0