From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 432C8C31E5B for ; Mon, 17 Jun 2019 16:52:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E67E208C0 for ; Mon, 17 Jun 2019 16:52:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726047AbfFQQw0 (ORCPT ); Mon, 17 Jun 2019 12:52:26 -0400 Received: from mga07.intel.com ([134.134.136.100]:42493 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfFQQwZ (ORCPT ); Mon, 17 Jun 2019 12:52:25 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 09:52:25 -0700 X-ExtLoop1: 1 Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.36]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2019 09:52:24 -0700 Date: Mon, 17 Jun 2019 09:52:25 -0700 From: Sean Christopherson To: Jarkko Sakkinen Cc: linux-sgx@vger.kernel.org, luto@kernel.org, cedric.xing@intel.com Subject: Re: [PATCH RFC] x86/sgx: Do not increase encl->refcount for VMAs Message-ID: <20190617165224.GB25085@linux.intel.com> References: <20190613163008.4060-1-jarkko.sakkinen@linux.intel.com> <20190617164025.GA9762@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190617164025.GA9762@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-sgx-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Mon, Jun 17, 2019 at 07:40:25PM +0300, Jarkko Sakkinen wrote: > On Thu, Jun 13, 2019 at 07:30:07PM +0300, Jarkko Sakkinen wrote: > > Since the device file stays open up until all VMAs have been closed > > we do not need to increase encl->refcount for VMAs. sgx_open() will > > increase it once and sgx_release() will decrease at a point where > > the device file is not mapped. anymore. > > > > Signed-off-by: Jarkko Sakkinen > > Cool if I merge this one? LGTM