From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751348AbcEIHGI (ORCPT ); Mon, 9 May 2016 03:06:08 -0400 Received: from mga11.intel.com ([192.55.52.93]:64434 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbcEIHGG (ORCPT ); Mon, 9 May 2016 03:06:06 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,600,1455004800"; d="scan'208";a="99666200" Date: Mon, 9 May 2016 10:06:00 +0300 From: Jarkko Sakkinen To: Jethro Beekman Cc: gregkh@linuxfoundation.org, "open list:STAGING SUBSYSTEM" , "maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT" , "open list:X86 ARCHITECTURE 32-BIT AND 64-BIT" , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner Subject: Re: [PATCH 3/6] intel_sgx: driver for Intel Secure Guard eXtensions Message-ID: <20160509070600.GA27328@intel.com> References: <1461605698-12385-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1461605698-12385-4-git-send-email-jarkko.sakkinen@linux.intel.com> <57206102.3050507@jbeekman.nl> <20160427124056.GA22003@intel.com> <57214C07.8090806@jbeekman.nl> <20160429200449.GB27821@intel.com> <5723DE9B.7030102@jbeekman.nl> <20160509052917.GA20120@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160509052917.GA20120@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2016 at 08:29:17AM +0300, Jarkko Sakkinen wrote: > On Fri, Apr 29, 2016 at 03:22:19PM -0700, Jethro Beekman wrote: > > On 29-04-16 13:04, Jarkko Sakkinen wrote: > > >>> Why would you want to do that? > > >> > > >> ... > > > > > > Do you see this as a performance issue or why do you think that this > > > would hurt that much? > > > > I don't think it's a performance issue at all. I'm just giving an example of why > > you'd want to do this. I'm sure people who want to use this instruction set can > > come up with other uses, so I think the driver should support it. Other drivers > > on different platform might support this, in which case we should be compatible > > (to achieve the same enclave measurement). Other Linux drivers support it [1]. I > > would ask: why would you not want to do this? It seems trivial to expand the > > current flag into 16 separate flags; one for each 256-byte chunk in the page. > > I'm fine with adding a 16-bit bitmask. I did some experiementation and since this doesn't make the API more complicated it is probably ok. Field that I declared was: __u16 mrmask; Measure one page: add_page.mrmask = ~0; Skip the measurement: add_page.mrmask = 0: /Jarkko