Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2018022imm; Thu, 27 Sep 2018 06:15:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV63HUw9PMy0s4In/nhXAz5pN0/ISbqNZEL8lv7ILUDTQmwbuOu0G2Qd8/frD+6amOgirFoTL X-Received: by 2002:a62:8d16:: with SMTP id z22-v6mr2009271pfd.185.1538054130327; Thu, 27 Sep 2018 06:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538054130; cv=none; d=google.com; s=arc-20160816; b=o3X983F84wTHNPs1DgbAPB4M6aQ6+AWphHjjL4vhwjG8y7cKQoUnqDbbngF6Rzcgaf mHv3wyHNPVCj012qK+bkwiN3obcAb9r+klM2bYSFXwWsXIurmSYaWz+Fm0rdFnpu30cO xQo1N9yO8IVoafltmcddW1fnnPwQngEge0aoQfDgS4BwYwkVRNWpexI+7AgM1vtqyYVZ uIE8APMBNK4scj14eYNo4A3orHCy9TtvPJwZc7Jy3JxsAHbsxArWwidYvjNn/xp8t7yc BfoGDHiVsXVtm19hZguGNetxXEWmRHG0UBnTqwS/q5G/b3SApVCtKLVIIoL3RgdCkqM5 k+iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cgwTTtdl3lb0oVZgm8QPBZUKqWUO8gDop8Fr5mdWndA=; b=o2cQMRBldR2wk+PZ6qkLl7z3s0knpgqIlYpJP3bXz7qhx3ngigGcMGRKZ7oGkSGHDX QeUTqtlpds83ggeov7Xf9BAiP7rUzRQQPAbqS3Hk+YuIct5Jm7zYF1BzqpQkD2IHuass S8RlN44CE9gnQRNMpxxoJZSONSqmz3BQmUKlqfRtG284klrF/YHxiNWR2gTbLEobMX5K h0PUkw2L9bG09NgJ2cElDJ1j5YCIKHekO7URsF5bOYYVHcPTVWI7FN7Q+B4S6VU6GtFc DSWK7udjgVluNwPITk2s5wSF235lWRl14lxE7D2mPgh+MeGMSDy9A3n3lRu2vQxZgO/U w9ZQ== 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 19-v6si2028494pgy.577.2018.09.27.06.15.13; Thu, 27 Sep 2018 06:15:30 -0700 (PDT) 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 S1727585AbeI0Tcj (ORCPT + 99 others); Thu, 27 Sep 2018 15:32:39 -0400 Received: from mga14.intel.com ([192.55.52.115]:45028 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727175AbeI0Tcj (ORCPT ); Thu, 27 Sep 2018 15:32:39 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 06:14:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,310,1534834800"; d="scan'208";a="236458795" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.69]) by orsmga004.jf.intel.com with ESMTP; 27 Sep 2018 06:14:19 -0700 Date: Thu, 27 Sep 2018 16:14:18 +0300 From: Jarkko Sakkinen To: Andy Lutomirski Cc: X86 ML , Platform Driver , Dave Hansen , "Christopherson, Sean J" , nhorman@redhat.com, npmccallum@redhat.com, "Ayoun, Serge" , shay.katz-zamir@intel.com, linux-sgx@vger.kernel.org, Andy Shevchenko , Dave Hansen , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , LKML Subject: Re: [PATCH v14 09/19] x86/mm: x86/sgx: Signal SEGV_SGXERR for #PFs w/ PF_SGX Message-ID: <20180927131418.GD5436@linux.intel.com> References: <20180925130845.9962-1-jarkko.sakkinen@linux.intel.com> <20180925130845.9962-10-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 25, 2018 at 03:53:48PM -0700, Andy Lutomirski wrote: > Minor nit: > > On Tue, Sep 25, 2018 at 6:12 AM Jarkko Sakkinen > wrote: > > > > From: Sean Christopherson > > > > > by (c) as the kernel doesn't really have any other reasonable option, > > e.g. we could kill the task or panic, but neither is warranted. > > Not killing the task is quite nice, but... > > > + /* > > + * Access is blocked by the Enclave Page Cache Map (EPCM), > > + * i.e. the access is allowed by the PTE but not the EPCM. > > + * This usually happens when the EPCM is yanked out from > > + * under us, e.g. by hardware after a suspend/resume cycle. > > + * In any case, there is nothing that can be done by the > > + * kernel to resolve the fault (short of killing the task). > > Maybe s/killing the task/sending a signal/? Agreed. Thanks. /Jarkko