Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3812495ybi; Mon, 3 Jun 2019 00:13:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXzbuI4ziDbg54DMOf/YEUJCpFD16NFGUJAsaJQY+EOoRV9EYSYRKFB4iJOifVI5OJa8w5 X-Received: by 2002:a17:90a:4fa6:: with SMTP id q35mr28568537pjh.74.1559546006180; Mon, 03 Jun 2019 00:13:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559546006; cv=none; d=google.com; s=arc-20160816; b=M39rMrpV3+iRM8SnBNvCR7HROdEmUY6d6ac0c8D4wUvQXCr7kHZATGp6tuVsBk201S MSXKbYrGwfd2aWT/jmmjKeA6Hx8aHTVT1X1k3Nr1AiGEn9xcHapyTEXAEI6vBXKUTHCJ GXcDXdm6R1Nn0qu8z7imBTCAuamFCMv+5zBmqAtjkQTDmYCQfhF/8HoLt4LAEu/LpT2m Mew4E9w6bAOqVNdXXHv0yxuBkcn5oEBZg1onA7ht/aksq8OdN3ZilqemypXIuYqjd4ZA kVAqItRXJ4qu73nm/Mg7K/9EG44/+jYMC2w+kZDBTSIW7ceLMZ4r92ElAuU8GJtRni49 bzMQ== 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 :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=gklM7n2eOl5Vtjxt33UCHWgHvNWkQc6WR9FDbsOMS4k=; b=uTsoKVNI/nqq4613ifUKOdzl5Xj+Nh4XC3UbrzthYAgDBaCqxv50AoXSpis91vwzZM O0iJgonH0WvDemNdmUc888y7EjqmWrKmw9tj/hfA2QK0sgwH6aNKaju2XoNJPx4F07NX DZR6s3cuPMACOn1Ugp/Es7yfXcwIlaxOTiT1p74PbW+RbZnjaaQ6fj/9V3aKfnOjn9Xt fyRfAfkqrzT8YcG5QaF4mdCk39476XqGDyfqdikxLkPUyHnRWbl0UTwWTlA/T34IgCPb Xu+T4bcw99i2ksfebLJinJbKDwyINlxhjg0g7aMaMA3mbiYzXPAeYpmahN+f2cYQHgV9 xU1A== 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 y17si9869906pjp.76.2019.06.03.00.13.08; Mon, 03 Jun 2019 00:13:26 -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 S1726968AbfFCG1N convert rfc822-to-8bit (ORCPT + 99 others); Mon, 3 Jun 2019 02:27:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:2673 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbfFCG1M (ORCPT ); Mon, 3 Jun 2019 02:27:12 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jun 2019 23:27:12 -0700 X-ExtLoop1: 1 Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga004.jf.intel.com with ESMTP; 02 Jun 2019 23:27:12 -0700 Received: from orsmsx157.amr.corp.intel.com (10.22.240.23) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Jun 2019 23:27:11 -0700 Received: from orsmsx116.amr.corp.intel.com ([169.254.7.165]) by ORSMSX157.amr.corp.intel.com ([169.254.9.37]) with mapi id 14.03.0415.000; Sun, 2 Jun 2019 23:27:10 -0700 From: "Xing, Cedric" To: "Christopherson, Sean J" , "Jarkko Sakkinen" CC: Andy Lutomirski , Stephen Smalley , James Morris , "Serge E . Hallyn" , LSM List , Paul Moore , Eric Paris , "selinux@vger.kernel.org" , Jethro Beekman , "Hansen, Dave" , "Thomas Gleixner" , Linus Torvalds , LKML , X86 ML , "linux-sgx@vger.kernel.org" , Andrew Morton , "nhorman@redhat.com" , "npmccallum@redhat.com" , "Ayoun, Serge" , "Katz-zamir, Shay" , "Huang, Haitao" , "Andy Shevchenko" , "Svahn, Kai" , Borislav Petkov , Josh Triplett , "Huang, Kai" , David Rientjes , "Roberts, William C" , "Tricca, Philip B" Subject: RE: [RFC PATCH 4/9] mm: Introduce vm_ops->mprotect() Thread-Topic: [RFC PATCH 4/9] mm: Introduce vm_ops->mprotect() Thread-Index: AQHVGAkihPJSJKjEXkOwgyZZXVyNTKaJYL6g Date: Mon, 3 Jun 2019 06:27:10 +0000 Message-ID: <960B34DE67B9E140824F1DCDEC400C0F654ECBDB@ORSMSX116.amr.corp.intel.com> References: <20190531233159.30992-1-sean.j.christopherson@intel.com> <20190531233159.30992-5-sean.j.christopherson@intel.com> In-Reply-To: <20190531233159.30992-5-sean.j.christopherson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGQ3OWU3Y2YtYWJlNy00MjE5LWFmYmYtNjVhMDQ5Y2E5MmZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicG5xVVpVQUJwVnJ3UUt0ZjVoMHV4ZVlQa3kxTXphd2tUWlNZNWV3WFwvWXRiMWc3QkRvREYybHdSS0pPc3ErNHEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > diff --git a/include/linux/mm.h b/include/linux/mm.h index 0e8834ac32b7..50a42364a885 > 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -458,6 +458,8 @@ struct vm_operations_struct { > void (*close)(struct vm_area_struct * area); > int (*split)(struct vm_area_struct * area, unsigned long addr); > int (*mremap)(struct vm_area_struct * area); > + int (*mprotect)(struct vm_area_struct * area, unsigned long start, > + unsigned long end, unsigned long prot); As I commented in my reply to the cover letter, SGX driver doesn't need to intercept mprotect() if ALLOW_* flags are not spilled into it. > vm_fault_t (*fault)(struct vm_fault *vmf); > vm_fault_t (*huge_fault)(struct vm_fault *vmf, > enum page_entry_size pe_size);