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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 BC9A8C433E0 for ; Fri, 22 May 2020 21:52:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8986A2065C for ; Fri, 22 May 2020 21:52:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8986A2065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E931580008; Fri, 22 May 2020 17:52:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1C4A80007; Fri, 22 May 2020 17:52:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBD4D80008; Fri, 22 May 2020 17:52:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id AF19D80007 for ; Fri, 22 May 2020 17:52:48 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 69665248D for ; Fri, 22 May 2020 21:52:48 +0000 (UTC) X-FDA: 76845705216.20.kiss94_35617371f3334 X-HE-Tag: kiss94_35617371f3334 X-Filterd-Recvd-Size: 2966 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 May 2020 21:52:46 +0000 (UTC) IronPort-SDR: wbBqMPxS66I8n452/NYrYDPAxWW+/ft+r8ndnv9tr4fhqbCUWVaq9SL2jgLunfrDsSV8aY9E+T xqFwXPeM6aZg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 14:52:45 -0700 IronPort-SDR: w0eSIGE/0ed2ljj0/MFvqOPI8oRzvQgTxR//H2BaaQg4eHpzJ7vnlvJVcjhG+ujHcBF/s87HUP DP4VhEgytrJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,423,1583222400"; d="scan'208";a="344292728" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by orsmga001.jf.intel.com with ESMTP; 22 May 2020 14:52:45 -0700 Date: Fri, 22 May 2020 14:52:45 -0700 From: Sean Christopherson To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com, linux-mm@kvack.org, Jethro Beekman , Jordan Hand , Chunyang Hui , Seth Moore Subject: Re: [PATCH v30 12/20] x86/sgx: Add a page reclaimer Message-ID: <20200522215245.GD25128@linux.intel.com> References: <20200515004410.723949-1-jarkko.sakkinen@linux.intel.com> <20200515004410.723949-13-jarkko.sakkinen@linux.intel.com> <20200522065802.GC23459@linux.intel.com> <20200522195705.GA121599@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522195705.GA121599@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 22, 2020 at 10:57:05PM +0300, Jarkko Sakkinen wrote: > v31: > * Unset SGX_ENCL_IOCTL in the error path of checking encl->flags in order > to prevent leaving it set and thus block any further ioctl calls. > * Added missing cleanup_srcu_struct() call to sgx_encl_release(). > * Take encl->lock in sgx_encl_add_page() in order to prevent races with > the page reclaimer. > * Fix a use-after-free bug from page reclaimer. Call kref_put() for the > encl->refcount only after putting enclave page back to the active page > list because it could be the last ref to the enclave. > > I'm ready to send a new version of the patch set once there is a > conclusion with the sigstruct vendor field. Fire away, nothing pending on my end, the cgroup tests appear to be running clean.