Message ID | 20180902064601.183036-73-alexander.levin@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE81214E0 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 2 Sep 2018 13:05:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1E0A287E5 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 2 Sep 2018 13:05:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95B41296EA; Sun, 2 Sep 2018 13:05:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED9D8287E5 for <patchwork-linux-mm@patchwork.kernel.org>; Sun, 2 Sep 2018 13:05:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C1C9B6B625B; Sun, 2 Sep 2018 09:05:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BC4076B625D; Sun, 2 Sep 2018 09:05:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A64F26B625E; Sun, 2 Sep 2018 09:05:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by kanga.kvack.org (Postfix) with ESMTP id 7B53A6B625B for <linux-mm@kvack.org>; Sun, 2 Sep 2018 09:05:00 -0400 (EDT) Received: by mail-qk1-f198.google.com with SMTP id 77-v6so1187839qkz.5 for <linux-mm@kvack.org>; Sun, 02 Sep 2018 06:05:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:thread-topic :thread-index:date:message-id:references:in-reply-to:accept-language :content-language:spamdiagnosticoutput:spamdiagnosticmetadata :content-transfer-encoding:mime-version; bh=K/HFXmI7ykAxsLqcir6BctWe4FkeGzrGBMjcZ7LLqmg=; b=gipKJSZXmaeYxH00qBWypxMNr3O08bVrjXGj49gNLqxDijrqRpjBZfO4VzCxKvblop aH4tvRhb8m27dzwzrbtvAd3JjU5uspOLOLDusV+DRNBCiYjO6XOZDKyEdXZJ1+/g6VyG pylQlXoh1cV1JkN/yaIoPMutxMUisUosinXov6MbiETfO9GqhH1TdFk/92IsIGsMAMeG AFmTEv7OBTdd+2EgLMDY5zZ0+Sp0vfX1ufHabQd85qwmNtUXoZYUqhOk4jQ04MRZxM2R On7KFKzEGMmenjZZECT9NQYAX7ajNSxNUpxMMZSli8MD0Sq9YZdo87RQGAH7rIRfrWuu E6ew== X-Gm-Message-State: APzg51A3fgGVEPEdhtwLz21VkiGGCk1XS5hLf/zVbHR2ovL9TbWC4Mv6 bvdcATD+H/JD5lZ3WfkwlJ2x2/3VGZe6R+BR6OKUYiFGlU+J1KdNR1tyjY0a7KnS25NOqecrBs9 H0OAAiHneTLnZ9H+9T3AphTxVoTL3MZEayyqJ64JhzGLcqmGOmvQw3j1XFUGAoDkmGg== X-Received: by 2002:a0c:9251:: with SMTP id 17-v6mr22537582qvz.239.1535893500147; Sun, 02 Sep 2018 06:05:00 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0wB3grUjYrrs3k7ffuwlo6m94bGnzXK6nNGniFxsdh43IDJD/jsNjWkcmSBizJsla1qUb X-Received: by 2002:a0c:9251:: with SMTP id 17-v6mr22537551qvz.239.1535893499532; Sun, 02 Sep 2018 06:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535893499; cv=none; d=google.com; s=arc-20160816; b=jDMJi5vAaxoOWOX6TSeatA7qrye2q2W2Tt/DqBZFAsvGEGFNI7Qp7sxRbcgXKkPp4k u9sRXSB1RQKelajynSH2QxdOCp2YNyDYnJMVfN9u5BiIq0XMjgbtEqHQ66sFPIZt9va8 X24dg/DPGppzW9d0ilmDrFIzs6Jm4i/iLeT4JEyPDlc9DEvQ4J3RGp2GH46nrtYUelYu dfr9afVX4bZxJMrT5zZMMq5/l3DobrQnjVnXrM5xUUvkCXlMaXfsJS6g0bcl+hxpZpn7 bvZSYGSC3dkIcDFuqvqR2ObHwU1jvPml7XAVH5ux47iYlASEdw4t8VaL3bxiJDdsjwZg U34g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=K/HFXmI7ykAxsLqcir6BctWe4FkeGzrGBMjcZ7LLqmg=; b=IUlyCBBv3SdamAantENYAYjbg44ePFTypkHeteMTf/FrwtGrh4oZzI+TbKOXxfj7Nc hF24XUK64TMwBZciWdjNL9LMS87qcLeODq0awm6cMJWfWoJxWKcJpuwUYTXbSQ7UywdH wPRnUzoQIDyAIrYbFzDjp6B0NCJ0w3Y5Z4VxfTXonMdtodM8Dngqtv7wzY9zSyszCvvl K3p5/C9qmj+fQPpEQAODGYJrHwVWDvdvMzfVNEiSVhFYglz3Mj1TlHtT0rj8qfFz2N40 qh781DI8yWVkeEq9g/1PC2B1BWlQWU5MBqFlEuqHrHz1ock24EFwkPtTco6sZtTNJ60t vLZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=XtiaIFfM; spf=pass (google.com: domain of alexander.levin@microsoft.com designates 40.107.68.93 as permitted sender) smtp.mailfrom=Alexander.Levin@microsoft.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680093.outbound.protection.outlook.com. [40.107.68.93]) by mx.google.com with ESMTPS id d3-v6si4038624qvo.218.2018.09.02.06.04.59 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Sep 2018 06:04:59 -0700 (PDT) Received-SPF: pass (google.com: domain of alexander.levin@microsoft.com designates 40.107.68.93 as permitted sender) client-ip=40.107.68.93; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=XtiaIFfM; spf=pass (google.com: domain of alexander.levin@microsoft.com designates 40.107.68.93 as permitted sender) smtp.mailfrom=Alexander.Levin@microsoft.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com 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:X-MS-Exchange-SenderADCheck; bh=K/HFXmI7ykAxsLqcir6BctWe4FkeGzrGBMjcZ7LLqmg=; b=XtiaIFfMgO/SpDqYiN7tR0dhQXAngaEniP7PkFLu6RdOnBVZNOsTdvYVBHBzW+DsWt0MzKxw5bMQ+7YvEYZupxYTmedoRdr+cxR5/KIiOkhMLes0hk3ByNBqc0tN4FmSI7lw38BSKirnvCN2iRZiZRGkAwsR8H2mfIfjwAXPoSg= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0741.namprd21.prod.outlook.com (10.173.189.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:04:53 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:04:53 +0000 From: Sasha Levin <Alexander.Levin@microsoft.com> To: "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: Joerg Roedel <jroedel@suse.de>, Thomas Gleixner <tglx@linutronix.de>, "H . Peter Anvin" <hpa@zytor.com>, "linux-mm@kvack.org" <linux-mm@kvack.org>, Linus Torvalds <torvalds@linux-foundation.org>, Andy Lutomirski <luto@kernel.org>, Dave Hansen <dave.hansen@intel.com>, Josh Poimboeuf <jpoimboe@redhat.com>, Juergen Gross <jgross@suse.com>, Peter Zijlstra <peterz@infradead.org>, Borislav Petkov <bp@alien8.de>, Jiri Kosina <jkosina@suse.cz>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Brian Gerst <brgerst@gmail.com>, David Laight <David.Laight@aculab.com>, Denys Vlasenko <dvlasenk@redhat.com>, Eduardo Valentin <eduval@amazon.com>, Greg KH <gregkh@linuxfoundation.org>, Will Deacon <will.deacon@arm.com>, "aliguori@amazon.com" <aliguori@amazon.com>, Daniel Gruss <daniel.gruss@iaik.tugraz.at>, "hughd@google.com" <hughd@google.com>, "keescook@google.com" <keescook@google.com>, Andrea Arcangeli <aarcange@redhat.com>, Waiman Long <llong@redhat.com>, Pavel Machek <pavel@ucw.cz>, Arnaldo Carvalho de Melo <acme@kernel.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, "joro@8bytes.org" <joro@8bytes.org>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL 4.18 073/131] x86/kexec: Allocate 8k PGDs for PTI Thread-Topic: [PATCH AUTOSEL 4.18 073/131] x86/kexec: Allocate 8k PGDs for PTI Thread-Index: AQHUQr2AgA4Nl75l9UGONf6ZpoMAwQ== Date: Sun, 2 Sep 2018 13:04:37 +0000 Message-ID: <20180902064601.183036-73-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-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;CY4PR21MB0741;6:auUwmAR9cL6XLJxSn85mWJBJjEXl8VQpbY6vYPMZtiJ62FA1ECuuPWGbabApLL9jbgud4W0A83FgUsZvlU4Ovxt9r15Ixml2KvRoy6PNElWJNpqlM/xc6cegf8JVKUJQBCfK74s7InfwTjlmYNKwSjvbg/xeNMhY6/GIoW+B8IGtUibxOqUq59+bkHrLGhnWGyLrfCkSuTT9IgNAKhnU88xAkMDbQ41QpjSwaJW2yJTtNGaG4+5ybPkcv7hR16yx//S+SDjwB8P+oEjPAAnSXINlmWdddzO8CGkeckNoFOXt1Xa+1hsz4B0i9GWBqI6x0yblEvpN72F00PCPq35wm7QMM7gTDMGuY5pdYNQy2FFfzSJx5fT7BrSq5QNipTeSzJiksG2jiUjjBBqJz/OLK8AdH7CJdzqFJZoVn00rNAyS/d6x1d0Lx7v/pnj/NWiOFXYUmhQCRmVw6sA6bPabrQ==;5:5Ex8XZ5VGljh3anht2weCZaJb1xWgMOwOw9oGgaVWHms6oANJsIHTQz+O+scfau+nuqDuioM7/Ib+AOUq5CPDb3mcjMOgX8ItUYcP8cEiYvTQ3hpORXxggG0aFRZBBznFF1UHd3ECo3RVQi0YO1uI0BCv0690kwbU8kc40BYYBE=;7:gNuQ94mPPoIRxI1+HnMtVj59/p4C92ZSRCcC36/h9EHR/HNNLc8SHqEyTrORBvFDZcMI8sYEHj+Wr++eXqiyJuOhqDy7+TCwRyzrZ2/ODvQx5bkOiHv8RzvSj+kCmxAguTQcPFcGiEjHs43olxAkQQPSKPeRWz2gsYu0wU2hsMjChuOcYswPvQoD20JfMzcxEMs19fiPQCZBoByCDFVsCBTReDJgeKWM8MY2py5wC0c0tvh++0e8BqZ6HPYBHN3G x-ms-office365-filtering-correlation-id: 25319e02-bf52-4389-d387-08d610d4ace6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:CY4PR21MB0741; x-ms-traffictypediagnostic: CY4PR21MB0741: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: <CY4PR21MB0741C906510D6AE428FE69F4FB0D0@CY4PR21MB0741.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(20283166320243)(28532068793085)(180628864354917)(89211679590171)(33061846794335)(85827821059158)(211936372134217)(42068640409301)(146099531331640)(47284530071512); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231340)(944501410)(52105095)(2018427008)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699049)(76991033);SRVR:CY4PR21MB0741;BCL:0;PCL:0;RULEID:;SRVR:CY4PR21MB0741; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39860400002)(136003)(346002)(396003)(376002)(199004)(189003)(97736004)(2906002)(186003)(26005)(256004)(14444005)(102836004)(11346002)(25786009)(476003)(486006)(2616005)(446003)(305945005)(66066001)(5250100002)(2501003)(7736002)(6506007)(8676002)(68736007)(76176011)(6666003)(99286004)(6486002)(39060400002)(105586002)(81156014)(81166006)(53936002)(7416002)(5660300001)(22452003)(478600001)(6436002)(86362001)(14454004)(54906003)(36756003)(106356001)(110136005)(6512007)(4326008)(6306002)(107886003)(217873002)(3846002)(2900100001)(7406005)(316002)(8936002)(1076002)(10090500001)(6116002)(72206003)(86612001)(966005)(10290500003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0741;H:CY4PR21MB0776.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: rYpgndPV7GglSLsxVffv48xIvWah6Hns85QnUq+6ipip+416S1xRcglL1HXvKJMa2zKypAKtlWELrsEm4ALs2MFunUgzXRgyt64b/AM0jMD+4quOPRWrqyB/MwC2PVM6nU6cIxhR61CA77BR3hE9VBM5iRfjQg0gl7IdLmTnYPo6Ez29QCFJuYepdix7dvZv3FFcAnLjKuXpPAxWAGiEaYstSpeFTgUH+bLBzL7jZXPGN55vzXJ7ul9pjN9MauPJqj6hDPzr51gLVztZriwJM5vIfNyiCWydYdBI5GJlgYh5eBufK/sfvhQn3C1XWZPEglY5EBqoiob9y+I0c3KudwsCVg3DrB8tDBXTp1nJRW4= 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: 25319e02-bf52-4389-d387-08d610d4ace6 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:04:37.3056 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0741 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
None
|
expand
|
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index d1ab07ec8c9a..5409c2800ab5 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c @@ -56,7 +56,7 @@ static void load_segments(void) static void machine_kexec_free_page_tables(struct kimage *image) { - free_page((unsigned long)image->arch.pgd); + free_pages((unsigned long)image->arch.pgd, PGD_ALLOCATION_ORDER); image->arch.pgd = NULL; #ifdef CONFIG_X86_PAE free_page((unsigned long)image->arch.pmd0); @@ -72,7 +72,8 @@ static void machine_kexec_free_page_tables(struct kimage *image) static int machine_kexec_alloc_page_tables(struct kimage *image) { - image->arch.pgd = (pgd_t *)get_zeroed_page(GFP_KERNEL); + image->arch.pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, + PGD_ALLOCATION_ORDER); #ifdef CONFIG_X86_PAE image->arch.pmd0 = (pmd_t *)get_zeroed_page(GFP_KERNEL); image->arch.pmd1 = (pmd_t *)get_zeroed_page(GFP_KERNEL);