Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp616701ybr; Fri, 22 May 2020 14:54:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyavpMxGX2ZfPdShmgCbmGS0U2viBlOkO3NWVFz1i1PEAoSXEqP0olIcAkjaLsDwNUcx8Md X-Received: by 2002:a17:906:3798:: with SMTP id n24mr1372152ejc.65.1590184480507; Fri, 22 May 2020 14:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590184480; cv=none; d=google.com; s=arc-20160816; b=KT0U5S4Gh3O297XoEY+pg9mx1VSIlZaYULdZumiu0hrHUNNRnxqcRMxU9OYP1GPEN6 a1EYmbNluOoBb1OjF1WWt8sRhVVMzdyLEDEWwP7nyG//UitFeopMai7T27a4tHiBe8oV y1EwGvEZeXNoiL9L4kYH3D1Sk4SQfzfmeQjjpt6fDLnF08RQG/KRPU4/BRloGhBWXKJW /DW7eWIE/nnm5IH0/+bOkdJ+KfxbU7xvH0qGRfFSiwyT8xC2m2kxxImLprCSFyQQU6fL qhNZv3hKednl35PLD/9MEh89DDgxZCm+0MM3q19sPOdRcOJAXZY49bzNtKHJQ13ZZuVa BhtQ== 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:ironport-sdr:ironport-sdr; bh=cbj+AfSiu8EpHb8jq7F2/zoQsUIj79QnJvuemKJ/SNo=; b=QZCMHctgWA5TMpZZZ5qmBV7eFEZfaPD6Se7jLySxUbbW0YEHEa2rDUiP7IbZdrrWdx SAJ5Hqt4yv/Qr0qwYk41imOPrlq6PQXYIFc8BcBKmdhbiwAxIHuZy1bVHzanDbiIIFfP vLv5yTeOsY0zCdZrp820OeObeEv3UYevSf8/a+w/ltjdh8jdplaIvgW08EqkrZzxohdH O4slHdcTgSQpMIfGSwjKDTCGHxG5SVjldCwtAaoeJfULCWudFEZuJaLrk/kWx2gkr7bp 722I96iGoWkKv0Zb3Sd7K3z+flZDmrJysQ/rpRiIJf9ER/P23s3izJYDDIgWJ1Myhx5T 1Q5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id bc18si5323706edb.558.2020.05.22.14.54.18; Fri, 22 May 2020 14:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1731163AbgEVVwr (ORCPT + 99 others); Fri, 22 May 2020 17:52:47 -0400 Received: from mga04.intel.com ([192.55.52.120]:34307 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731051AbgEVVwr (ORCPT ); Fri, 22 May 2020 17:52:47 -0400 IronPort-SDR: LG1IWQXu/JBdgLtXIelMcLu9Kw/SyDCsDUFpwd1lhnOnjBLg7GNjToVijJ6s7LW3DPuJS0UrDM RV8kSyfj0uAQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.