Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp7122462ybf; Fri, 6 Mar 2020 10:48:28 -0800 (PST) X-Google-Smtp-Source: ADFU+vvkUF2DIRHSh0yiiV3pwYDmHMl40ke6zsQ3huYoeAZqwxTIETeeiafJChHYULe5Z0o/9YF1 X-Received: by 2002:aca:318b:: with SMTP id x133mr3707313oix.107.1583520508052; Fri, 06 Mar 2020 10:48:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583520508; cv=none; d=google.com; s=arc-20160816; b=01fmnlH+YUiPTyIoZa3f9O1kKFA0TKMeK6yIwNVg53p0C+GsngAkuf7DfRGi25vqR2 jdzk4qBIxyt7ZQZUIUMHcl7T5X4sOiDexngobNAhr9Ipnt0E+gNqbmPtVP8jolRbU3fA VTYuECo2CSLdfNuZGMQQxkeuinJudNI4dP2p96fyZYmSp82qj5eiK7cexvObqPlqrZzD gmhzXTMOmpUgbAoUOpxK7lT7PEI5AoalaXWPkkZmFZmgD0lNRn3PDlKjmGx1pph9WvBn vX6fMG/B5//p/xORIYTdFF0ebH/mSbobWuVyuKh0tedS0H09QcxZhrRkl+K5nQUb40sA 5M2A== 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; bh=mk9pIx9v0tAEmM/Uftnpg7EGQ5MHJ1CQ0ARfdBIq6/Y=; b=bnVPUwqRM+TUFIZ09P4ZFxYEb0IQYNNnVzoQwYmAKU/fFIye39ALYxctE5hTtjTYN3 gTxQjniyZWMPJBYERpVN2O/cqi0Gnr0eYHts9P02qTUrK1Rkg2z5UnlSQ/SdK04YjxQp 4Raq/q1yOhXGtlit0O/y6K4OFpo+3DHaZg53NeYUKpSu6XLiMcBjVLbsSDBiyDz5qjf4 eV540o24MjSD10+dJAqZMDv2Wt7haRPLgRFHvfwVRZTo6XZjreWehvuhhnP3rngSEElA dL/W8OLpW0UWxx3WhxoRoSWHjnTWaS9CARsczY/t3K/Y2dlN8TC13gNQ7ruSZEFBC32g q4sQ== 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 z2si129787oix.100.2020.03.06.10.48.16; Fri, 06 Mar 2020 10:48:28 -0800 (PST) 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 S1726702AbgCFSrR (ORCPT + 99 others); Fri, 6 Mar 2020 13:47:17 -0500 Received: from mga02.intel.com ([134.134.136.20]:24392 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbgCFSrR (ORCPT ); Fri, 6 Mar 2020 13:47:17 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2020 10:47:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,523,1574150400"; d="scan'208";a="440203147" Received: from wbakowsk-mobl.ger.corp.intel.com (HELO localhost) ([10.252.27.142]) by fmsmga005.fm.intel.com with ESMTP; 06 Mar 2020 10:47:03 -0800 Date: Fri, 6 Mar 2020 20:47:02 +0200 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, Ismo Puustinen , Mark Shanahan , Mikko Ylinen , Derek Bombien Subject: Re: [PATCH v28 16/22] x86/sgx: Add a page reclaimer Message-ID: <20200306184702.GD7472@linux.intel.com> References: <20200303233609.713348-1-jarkko.sakkinen@linux.intel.com> <20200303233609.713348-17-jarkko.sakkinen@linux.intel.com> <20200305190354.GK11500@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305190354.GK11500@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 Thu, Mar 05, 2020 at 11:03:54AM -0800, Sean Christopherson wrote: > We've also discussed taking a file descriptor to hold the backing, but > unless I'm misreading the pagecache code, that doesn't solve the incorrect > accounting problem because the current task, i.e. evicting task, would be > charged. In other words, whether the backing is kernel or user controlled > is purely an ABI question. Even if the file is owned by a different process the account happens to "current"? /Jarkko