Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp545339ybr; Fri, 22 May 2020 12:50:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJkwEQcdR4MKwn+vYz4kiApZrcxva+0sqDG3E96YyUlzsPdJvp8pcj4mqwIm8xfDtWJsWh X-Received: by 2002:a17:906:b4e:: with SMTP id v14mr9534553ejg.302.1590177007152; Fri, 22 May 2020 12:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590177007; cv=none; d=google.com; s=arc-20160816; b=lZWCP3vsOQ51b7zIWbkz6DKkRLRpI9B+4K51/ZJJY59a5Dz89kf1aysr3J7ZphJL7y aO/raRnxfMbX9Bk4BZKMJRaycAVB7k4SPjfrXz5muMAhITM0v201Idv9QMNFHq5u8spr pTou1YJZ1H9fVcsd5lqTS3SyDE9tcNve3Fv5kPgeGLAVlPFIXKeCeYo2rtctRPxEl83f jvVZYmSA6sB8EynPWfLDFKMz0WZxajrDYUdbhdNb0ZK7majBZ3i1cfsjH2Dbd5+V4cbr VuiSBLxREQolaKB7kURm75wHi+WD/8nJtHkLveXu19YAvVztVZn9RPla9xjdS9oXNSjn 6VkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=0y1flX1TQq6jfsAA3z40Wpf2fJiEiTE08xXHTBpekYE=; b=DLJhz4qteSipQ5R6nWdKNl8bRymm/Kd5ZugqUZsHmAXvxWDZgWe3yRL8hN4h1UJzdM udCltVGGFEMmrCzY2WyDwHu7gbLIwbHUlhDCwROIRgHoAe1a7c+E86Ue2f/XTwT2wx0N ZteGV+cx+IDXJPKNQ2SLTCvewwkU+gSqw9kVLnYliSlcaSvwH3/y02WK78PFQnSUKdaA Pb+5k9RiPBdT35TLzyqIhiNyv4rgy9as3GT25dAg/QnJRSj0E11QQnS+kRxxMWXL4yK3 b1mthDT3S1dbPW4GkuNb8SJNjEyZc/du8kTx2FPi6h0C5BCZHCgxfNUIzwTV63KbDKxV 1Gxw== 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 g6si5057874eds.257.2020.05.22.12.49.42; Fri, 22 May 2020 12:50:07 -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 S1730982AbgEVTr6 (ORCPT + 99 others); Fri, 22 May 2020 15:47:58 -0400 Received: from mga01.intel.com ([192.55.52.88]:60246 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730689AbgEVTr6 (ORCPT ); Fri, 22 May 2020 15:47:58 -0400 IronPort-SDR: G27KpkWIjMdf0FtUmXE6Fu0XWCnef1SNGfKDVra28mfloZpIGR8CQaaLPoJ8CJc/uIIEFaZVRB kbfCpwaxP5Pw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 12:47:57 -0700 IronPort-SDR: 9IwrwK1WT4I8iAv7BqqpTIIIdtj2r+MVFF1QRTgU1dU3FqIka+1I71GnKlKiOwUykeWj2w3NE/ 4OWGW4GRUEew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,422,1583222400"; d="scan'208";a="344267267" Received: from rpurrx-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.58.10]) by orsmga001.jf.intel.com with ESMTP; 22 May 2020 12:47:51 -0700 Date: Fri, 22 May 2020 22:47:52 +0300 From: Jarkko Sakkinen To: Sean Christopherson 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: <20200522194752.GG10319@linux.intel.com> References: <20200515004410.723949-1-jarkko.sakkinen@linux.intel.com> <20200515004410.723949-13-jarkko.sakkinen@linux.intel.com> <20200522071553.GA24377@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522071553.GA24377@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 12:15:53AM -0700, Sean Christopherson wrote: > On Fri, May 15, 2020 at 03:44:02AM +0300, Jarkko Sakkinen wrote: > > +static void sgx_reclaimer_write(struct sgx_epc_page *epc_page, > > + struct sgx_backing *backing) > > +{ > > + struct sgx_encl_page *encl_page = epc_page->owner; > > + struct sgx_encl *encl = encl_page->encl; > > + struct sgx_backing secs_backing; > > + int ret; > > + > > + mutex_lock(&encl->lock); > > + > > + if (atomic_read(&encl->flags) & SGX_ENCL_DEAD) { > > + ret = __eremove(sgx_epc_addr(epc_page)); > > + ENCLS_WARN(ret, "EREMOVE returned %d\n"); > > The " returned %d\n" is unnecessary and leads to a bad message, ENCLS_WARN > handles the message and formatting, i.e. this should simply be: > > ENCLS_WARN(ret, "EREMOVE"); Sure. Did not make a changelog entry of this (because it is a cosmetic fix), but it is fixed in my tree. /Jarkko