All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Bojun Zhu" <zhubojun.zbj@antgroup.com>
Cc: "Huang, Kai" <kai.huang@intel.com>,
	"linux-sgx@vger.kernel.org" <linux-sgx@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"刘双(轩屹)" <ls123674@antgroup.com>,
	"Chatre, Reinette" <reinette.chatre@intel.com>
Subject: Re: [RFC PATCH 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup
Date: Wed, 24 Apr 2024 20:44:07 +0300	[thread overview]
Message-ID: <D0SJFJIPUE1M.36M8JVVXO89YQ@kernel.org> (raw)
In-Reply-To: <D428BE51-20DA-42C5-A2B0-B264D7564700@antgroup.com>

On Wed Apr 24, 2024 at 2:50 PM EEST, Bojun Zhu wrote:
> I still have some questions:
>
> It seems that the variable "ret" is set to 0 if there is **some** EPC pages have been 
> added when interrupted by signal(Supposed that sgx_encl_add_page() 
> always returns successfully).

Ah, ok.

Returning zero is right thing to do because it also returns count of
pages successfully added. I.e. the function does not guarantee that
all pages are processsed but it does guarantee that the system is in
predictable state.

It could be that e.g. sgx_alloc_epc_page() calls fails.

So, it is a bit like how read system call works.

BR, Jarkko

  reply	other threads:[~2024-04-24 17:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  9:25 [RFC PATCH 0/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup 朱伯君(杰铭)
2024-04-23  9:25 ` [RFC PATCH 1/1] " 朱伯君(杰铭)
2024-04-23 11:50   ` Huang, Kai
2024-04-23 17:08     ` Reinette Chatre
2024-04-23 21:27       ` Jarkko Sakkinen
2024-04-23 22:41         ` Huang, Kai
2024-04-23 21:22     ` Jarkko Sakkinen
2024-04-24  6:46     ` Bojun Zhu
2024-04-24  7:02       ` Jarkko Sakkinen
2024-04-24 10:42         ` Jarkko Sakkinen
2024-04-24 11:50           ` Bojun Zhu
2024-04-24 17:44             ` Jarkko Sakkinen [this message]
2024-04-24 17:47               ` Jarkko Sakkinen
2024-04-23 21:10   ` Jarkko Sakkinen
2024-04-23 21:20     ` Jarkko Sakkinen

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=D0SJFJIPUE1M.36M8JVVXO89YQ@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=kai.huang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=ls123674@antgroup.com \
    --cc=reinette.chatre@intel.com \
    --cc=zhubojun.zbj@antgroup.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.