Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1707778imu; Thu, 17 Jan 2019 01:50:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4YviNMRjVXib85NV885ZkzkyUqizE46Fz+05Kkr+ULFTl4op2l+NH1WfIuXZePb03SA0OO X-Received: by 2002:a17:902:1d4a:: with SMTP id u10mr13836738plu.122.1547718624861; Thu, 17 Jan 2019 01:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547718624; cv=none; d=google.com; s=arc-20160816; b=L3Qx4qUe72WvLqcd3iPTPf2rVUby+aABa8XpEJY7V+km7qwnjPiEjhr/TyIVWqwCNl LJO3l0XbRJ58YWawsszx+Q3tiXljrqrkUcZNA76/lfv7Ma2kTdprVauMHGSe+Ij3Uki8 GooVgu60csJuGwyZFF/GF2EtzXy/57uEgrse2xi11TU1AExq+gjxIcHf+Ddh1YQR//Kc E9vTBh7OxXiAruTdqfaU/IZiu0tZNjNca/LiaVmexHWIjzsPdwk23fKB+Exq606KaMDh sjuUhDrzZDGWoasZKRljy3H4hHSE5xlHmg10r9YH0ejfiRK0WECKKWcejNlBopKD37ds QehQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EBoOTZvdUI2MwRA18Q9zD1/7B50HUMZ3YmIuMJzKMvQ=; b=mF39UH81oAToxWpuLpeBC6CeC83Mgj/7jZ7c93gxSK/5MtZGQ6oX2czbR6SgX4GNmE 14j6bpM5F8hMxIulbRU1YL/+XDEZbB+gcxKXqh1DScnbUWETu+ODb6NwJDlTPhT2VxS+ Sfj0uDFGgz6blyvvT0BD2VWYdIksp3GxEydW+LYsCf/lOgODWhXZqCbgTqJXMDVs73G5 03LZs7D65CC2Bua9yyXzQX+RuNE5LyvK+0bXxXkKuGjSgYSN0f3hHpD4qzg1i44/KCYY 1Z93b9RQbtJ31l8nCRbrcpPdKr7zLzecaZT97jjp5q2CwNkskczixE91N0hfHRGHjnrV huew== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si1193665plt.181.2019.01.17.01.50.09; Thu, 17 Jan 2019 01:50:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727581AbfAQJjz (ORCPT + 99 others); Thu, 17 Jan 2019 04:39:55 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:36834 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbfAQJjy (ORCPT ); Thu, 17 Jan 2019 04:39:54 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 27DBF807A7; Thu, 17 Jan 2019 10:39:46 +0100 (CET) Date: Thu, 17 Jan 2019 10:39:50 +0100 From: Pavel Machek To: Rick Edgecombe Cc: Andy Lutomirski , Ingo Molnar , linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, Thomas Gleixner , Borislav Petkov , Nadav Amit , Dave Hansen , Peter Zijlstra , linux_dti@icloud.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, akpm@linux-foundation.org, kernel-hardening@lists.openwall.com, linux-mm@kvack.org, will.deacon@arm.com, ard.biesheuvel@linaro.org, kristen@linux.intel.com, deneen.t.dock@intel.com, "Rafael J. Wysocki" Subject: Re: [PATCH 14/17] mm: Make hibernate handle unmapped pages Message-ID: <20190117093950.GA17930@amd> References: <20190117003259.23141-1-rick.p.edgecombe@intel.com> <20190117003259.23141-15-rick.p.edgecombe@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline In-Reply-To: <20190117003259.23141-15-rick.p.edgecombe@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > For architectures with CONFIG_ARCH_HAS_SET_ALIAS, pages can be unmapped > briefly on the directmap, even when CONFIG_DEBUG_PAGEALLOC is not configu= red. > So this changes kernel_map_pages and kernel_page_present to be defined wh= en > CONFIG_ARCH_HAS_SET_ALIAS is defined as well. It also changes places > (page_alloc.c) where those functions are assumed to only be implemented w= hen > CONFIG_DEBUG_PAGEALLOC is defined. Which architectures are that? Should this be merged to the patch where HAS_SET_ALIAS is introduced? We don't want broken hibernation in between.... > -#ifdef CONFIG_DEBUG_PAGEALLOC > extern bool _debug_pagealloc_enabled; > -extern void __kernel_map_pages(struct page *page, int numpages, int enab= le); > =20 > static inline bool debug_pagealloc_enabled(void) > { > - return _debug_pagealloc_enabled; > + return IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) && _debug_pagealloc_enabled; > } This will break build AFAICT. _debug_pagealloc_enabled variable does not exist in !CONFIG_DEBUG_PAGEALLOC case. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --jRHKVT23PllUwdXP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlxATWYACgkQMOfwapXb+vLhEwCfboaaFJileFziF32t0acTiuuz dewAn0oneo6RWHmnu+B3dnprdMW4dCOy =4kpb -----END PGP SIGNATURE----- --jRHKVT23PllUwdXP--