public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhiquan Li <zhiquan1.li@intel.com>
To: "Luck, Tony" <tony.luck@intel.com>, Jarkko Sakkinen <jarkko@kernel.org>
Cc: "linux-sgx@vger.kernel.org" <linux-sgx@vger.kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"Christopherson,, Sean" <seanjc@google.com>,
	"Du, Fan" <fan.du@intel.com>, <zhiquan1.li@intel.com>
Subject: Re: [PATCH 0/4] x86/sgx: fine grained SGX MCA behavior
Date: Sat, 14 May 2022 13:39:28 +0800	[thread overview]
Message-ID: <35284def-ca7f-d42b-164f-1c49eb8977ee@intel.com> (raw)
In-Reply-To: <55ffd9475f5d46f68dd06c4323bec871@intel.com>


On 2022/5/14 00:35, Luck, Tony wrote:
>>> Do you think the processes sharing the same enclave need to be killed,
>>> even they had not touched the EPC page with hardware error?
>>> Any ideas are welcome.
>>
>> I do not think the patch set is going to wrong direction. This discussion
>> was just missing from the cover letter.

OK, I will add this point into v2 of cover letter and patch 03.

> 
> I was under the impression that when an enclave page triggers a machine check
> the whole enclave is (somehow) marked bad, so that it couldn't be entered again.
> 
> Killing other processes with the same enclave mapped would perhaps be overkill,
> but they are going to find that the enclave is "dead" next time they try to use it.

Thanks for your clarification, Tony.
You reminded me to check Intel SDM vol.3, 38.15.1 Interactions with MCA Events:

"All architecturally visible machine check events (#MC and CMCI) that are detected
while inside an enclave cause an asynchronous enclave exit.
Any machine check exception (#MC) that occurs after Intel SGX is first enables
causes Intel SGX to be disabled, (CPUID.SGX_Leaf.0:EAX[SGX1] == 0). It cannot be
enabled until after the next reset. "

So, I suppose current behavior would be gently enough, other processes with the
same enclave mapped should get rid of it if they really need to use the enclave
again. If we expect those processes to be early killed, it worth another patch set
to archive it.

Best Regards,
Zhiquan

> 
> -Tony

  reply	other threads:[~2022-05-14  5:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  3:16 [PATCH 0/4] x86/sgx: fine grained SGX MCA behavior Zhiquan Li
2022-05-11 10:29 ` Jarkko Sakkinen
2022-05-12 12:03   ` Zhiquan Li
2022-05-13 14:38     ` Jarkko Sakkinen
2022-05-13 16:35       ` Luck, Tony
2022-05-14  5:39         ` Zhiquan Li [this message]
2022-05-15  3:35           ` Luck, Tony
2022-05-16  0:57             ` Zhiquan Li
2022-05-16  2:29           ` Kai Huang
2022-05-16  8:40             ` Zhiquan Li
2022-05-17  0:43               ` Kai Huang
2022-05-18  1:02                 ` Zhiquan Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35284def-ca7f-d42b-164f-1c49eb8977ee@intel.com \
    --to=zhiquan1.li@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=fan.du@intel.com \
    --cc=jarkko@kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox