Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2844364imm; Fri, 20 Jul 2018 06:02:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcDTjtNJlu+iUNlHifR/Dd9NM1g9aym/R9C8qp33IN8MiHaSnqFP0vT3G2EfHuvNuUqxe9X X-Received: by 2002:a63:ee4e:: with SMTP id n14-v6mr2061152pgk.159.1532091744321; Fri, 20 Jul 2018 06:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532091744; cv=none; d=google.com; s=arc-20160816; b=tJ7/yuD8qMNeix8cZm3AmSCAioItYfZ6YC2VO7SXIl1uW/Eq8+SbqCXGcJcH8nJfPE nrnx1TeOQAfybavJ3S8GRTPHtiVIaksVRDsaWIUehZ+ZeLGnKmGK5JS6sIQAc9cX2KyD gdDMsZwewfwagXwyza2b9rMyqkyzsEFT0Rfev8mOwH/reEe6JN2ffNK89IBeQ6i6Jqf7 aexE6iJwl8YotyqVS/O1PS51mEtY1FEActNDYjeVwMzMjwdHD3GVbnBghFtnwo/byvqf Ni493yHW/KR07vqaUYrqIibeqeuJ6hB6LFhiXUETJH+L8f/5UneOXqPbAiM2oRFqm4sD HcHg== 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:dkim-signature:arc-authentication-results; bh=ta5vvVgJCKzDuXlJlUvy8VUbe05AVTwWpPny1GjFueQ=; b=PN17GcOwIWWn6arfQFhVYWKJE4r31UEhQJMruEA56TpSBQC5EBUBiPuNXCX8Wo2fTX EhqgpH/MyzU8TFm+rtpGSC06916Pgkoy6rOPwk+V+xpHAI2uTnMj6wPwuewLowWHLWjO TCNtojiwmGUawKMDE3Z1Nuz2+qISPa0XPz+7SCyO6bv+7uwHIzytC+vWrcTaqfnD9LEV IcPT+NWjjyDSdTaGpjrPaAE3LDzquXyZX8Uvap8xuHl72y03kCgukwm/1dO8uz50uPCX HGqaU+EEbguCuabFyq6kSYwx7V9XMyHbb+0YIzE1gtBgqfO+Hgj6Y5QYbOv7xwVxY1Aw 7/FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="E/v79LVg"; 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 a9-v6si1856225pgm.581.2018.07.20.06.02.08; Fri, 20 Jul 2018 06:02:24 -0700 (PDT) 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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="E/v79LVg"; 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 S1731235AbeGTNNV (ORCPT + 99 others); Fri, 20 Jul 2018 09:13:21 -0400 Received: from mail-pl0-f44.google.com ([209.85.160.44]:39847 "EHLO mail-pl0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728214AbeGTNNU (ORCPT ); Fri, 20 Jul 2018 09:13:20 -0400 Received: by mail-pl0-f44.google.com with SMTP id m1-v6so148523plt.6 for ; Fri, 20 Jul 2018 05:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ta5vvVgJCKzDuXlJlUvy8VUbe05AVTwWpPny1GjFueQ=; b=E/v79LVgIFPtCR9a7ltTZg50fcH4w80p7AtMr3Kf8oZ1w0MyoN0eh0KLTDz5c5nwsE q5d3orX+tdZXJPSIerUC0p4qoUigC4gY+QtfW+6oti9jLqTHHzI0M/aJh5UCQ1m6ONV4 NGwYsq9PnhtOnI3pW2kvdDCZUvfqq0JQxj/2wfVHz8aXFskvSxRdLBi/4y1g1fz9ORIG qasWOn21PIthlHUFNat579sfK/aZ3GjbaahSm6V2IALlsVEUwcdTEe0Y7KXaBZEojYzU 4dnpI3msUWJ8SUsjfh2mXUjYMnFvVinLyAdLLABoz6aJ/y+I9NaCQd3A1BgApR66cSsP UDOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ta5vvVgJCKzDuXlJlUvy8VUbe05AVTwWpPny1GjFueQ=; b=TVxPrFUbbYUdEwe+cSN82mgWf1eAnuciKvbe6ZVzk1zmgbQH0MUHSCw3LBWtR2KtV9 0Skyhl/0iblnkitpCMqrc/NIQbaYpRHW92/+O9fBC/TG5/70Nyo4yxsuiho834Xus+TM FGkr9a+fVKiXXFjQUNsiSRY8nNTxlJWuWW92QUXA/v5IgKeRT3SsmG1MDc8etRTrfqaD x9Og7OEx5ft4memigOAVONJOkWxZB2+PCY6/r/knvbFge27QX8amTOBYP2U6nj0GYVpV /5CsCkfHbNLoXtz8V3EavAWNkpTJ7n9Dx5oxBd7dnBNBxPv82xyNNeIvBdU+jQ248vsD 7YJA== X-Gm-Message-State: AOUpUlFr0nn3057xM9pHMrZSYqOmg70Q3sWnzNWFdNhX9sey+A0pqWvP m3+oeGvJjdoHRbyJ3fVKs39wcQ== X-Received: by 2002:a17:902:740b:: with SMTP id g11-v6mr1929588pll.85.1532089520849; Fri, 20 Jul 2018 05:25:20 -0700 (PDT) Received: from kshutemo-mobl1.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id c2-v6sm2636735pfa.138.2018.07.20.05.25.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 05:25:19 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 8F2CE300254; Fri, 20 Jul 2018 15:25:16 +0300 (+03) Date: Fri, 20 Jul 2018 15:25:16 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: Michal Hocko , "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky , Kai Huang , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv5 05/19] mm/page_alloc: Handle allocation for encrypted memory Message-ID: <20180720122516.zm35yk4r4tcy752s@kshutemo-mobl1> References: <20180717112029.42378-1-kirill.shutemov@linux.intel.com> <20180717112029.42378-6-kirill.shutemov@linux.intel.com> <95ce19cb-332c-44f5-b3a1-6cfebd870127@intel.com> <20180719082724.4qvfdp6q4kuhxskn@kshutemo-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 07:05:36AM -0700, Dave Hansen wrote: > On 07/19/2018 01:27 AM, Kirill A. Shutemov wrote: > >> What other code might need prep_encrypted_page()? > > > > Custom pages allocators if these pages can end up in encrypted VMAs. > > > > It this case compaction creates own pool of pages to be used for > > allocation during page migration. > > OK, that makes sense. It also sounds like some great information to add > near prep_encrypted_page(). Okay. > Do we have any ability to catch cases like this if we get them wrong, or > will we just silently corrupt data? I cannot come up with any reasonable way to detect this immediately. I'll think about this more. -- Kirill A. Shutemov