Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1215492ybi; Fri, 14 Jun 2019 10:33:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvhUKsQk5AssqR4ibNcD5BgpkIpEWFBEJ0ydoa+wqJt6N2+ZiHCIXmosuT9mp/qolAp+Ty X-Received: by 2002:a17:90a:290b:: with SMTP id g11mr12234446pjd.122.1560533602045; Fri, 14 Jun 2019 10:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560533602; cv=none; d=google.com; s=arc-20160816; b=TMDxGtH/YmbZyl4Y0ihbjVL+KLnR5iDDwcNRbmaysOpB/w0Dc+cru28qHzeaswaTXC nkYyEA+olafJy+lGt0XlkR4xCFDxry4x547fyaeUcHwK/f0lGDFpJeNGYkTLFCNL4Azn kzJHjwzHLliOKdyC2YFwS12ce1uM6N8fmcwyIVusFzUGODDevKQwXIORxVXUlBA+KmI/ LnhQOzh02G4Qh0oZQ4QG7fNj7zsmnUVT9eLeOYyi4D5ozQOvd1WlAVEIfp6IJDOHzmpM h4SeN6MUPI6aLuihTPDtUwjDJEsR/1zKoz4DU5xJwKXrrPPhKoTmT3oBKn7gn2O1VzUu Z38g== 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=Q5k5/JkverNJynE65mNuv0TQf6hmsM4Hqx1C4iCtCF4=; b=NQOwn1ZHmwEYivu0kTUVSCVIFjBU0DjoTBFki0jhiGveO8cWpyc3v1H0XjQdCtxWdm Wqn/VnIWFephQ028HSjjD5eU9S0ZpErSc5CLisNUfWsPG1DnLjU6NBoRFkEIwr3BPrTx Um4rcos94mkao50GDSKyKCjzUOGSPqLxaeHKtOEBzVVerHSQ9zDrfWxOyIGpCTNcFMST PzGeWo1NIoYfSj6rKbEkOJkx2hl55pdzXq235KN25F/ZmqgeoMlSfWw36YkCSTHM2Ux/ OQlNJXkE6F3lGaEZPjLhQZFd/YDmRou98KSO+4SGhYQ02cXOAnGFkqB8qVgK/ZPGptsb RG4Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207si3077873pfu.258.2019.06.14.10.33.06; Fri, 14 Jun 2019 10:33:22 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbfFNRcg (ORCPT + 99 others); Fri, 14 Jun 2019 13:32:36 -0400 Received: from mga12.intel.com ([192.55.52.136]:41698 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbfFNRcf (ORCPT ); Fri, 14 Jun 2019 13:32:35 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 10:32:34 -0700 Received: from alison-desk.jf.intel.com ([10.54.74.53]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 10:32:34 -0700 Date: Fri, 14 Jun 2019 10:35:41 -0700 From: Alison Schofield To: Peter Zijlstra Cc: "Kirill A. Shutemov" , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Andy Lutomirski , David Howells , Kees Cook , Dave Hansen , Kai Huang , Jacob Pan , linux-mm@kvack.org, kvm@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH, RFC 45/62] mm: Add the encrypt_mprotect() system call for MKTME Message-ID: <20190614173541.GC5917@alison-desk.jf.intel.com> References: <20190508144422.13171-1-kirill.shutemov@linux.intel.com> <20190508144422.13171-46-kirill.shutemov@linux.intel.com> <20190614114732.GE3436@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190614114732.GE3436@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 14, 2019 at 01:47:32PM +0200, Peter Zijlstra wrote: > On Wed, May 08, 2019 at 05:44:05PM +0300, Kirill A. Shutemov wrote: > > diff --git a/fs/exec.c b/fs/exec.c > > index 2e0033348d8e..695c121b34b3 100644 > > --- a/fs/exec.c > > +++ b/fs/exec.c > > @@ -755,8 +755,8 @@ int setup_arg_pages(struct linux_binprm *bprm, > > vm_flags |= mm->def_flags; > > vm_flags |= VM_STACK_INCOMPLETE_SETUP; > > > > - ret = mprotect_fixup(vma, &prev, vma->vm_start, vma->vm_end, > > - vm_flags); > > + ret = mprotect_fixup(vma, &prev, vma->vm_start, vma->vm_end, vm_flags, > > + -1); > > You added a nice NO_KEY helper a few patches back, maybe use it? Sure, done. (I hesitated to define NO_KEY in mm.h initially. Put it there now. We'll see how that looks it next round.) > > > if (ret) > > goto out_unlock; > > BUG_ON(prev != vma);