From: Haitao Huang <haitao.huang@linux.intel.com>
To: tip-bot2@linutronix.de
Cc: #@tip-bot2.tec.linutronix.de, haitao.huang@linux.intel.com,
linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
mingo@kernel.org, stable@vger.kernel.org,
v6.0+@tip-bot2.tec.linutronix.de, x86@kernel.org
Subject: [PATCH] Revert "x86/sgx: Return VM_FAULT_SIGBUS instead of VM_FAULT_OOM for EPC exhaustion"
Date: Thu, 26 Oct 2023 15:55:28 -0700 [thread overview]
Message-ID: <20231026225528.5738-1-haitao.huang@linux.intel.com> (raw)
In-Reply-To: <169778941056.3135.14169781154210769341.tip-bot2@tip-bot2>
This reverts commit 6b7b71a70af6d75e0a9eddf4b01e4383a78b8a5e.
That patch was a mistake.
link: https://lore.kernel.org/all/op.2dfkbh2iwjvjmi@hhuan26-mobl.amr.corp.intel.com/
Signed-off-by: Haitao Huang <haitao.huang@linux.intel.com>
---
Sorry for the trouble. Please use this to revert or drop it from the
the tip/x86/urgent branch.
---
arch/x86/kernel/cpu/sgx/encl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index d13b7e4ad0f5..279148e72459 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -322,7 +322,7 @@ struct sgx_encl_page *sgx_encl_load_page(struct sgx_encl *encl,
* ENCLS[EAUG] instruction.
*
* Returns: Appropriate vm_fault_t: VM_FAULT_NOPAGE when PTE was installed
- * successfully, VM_FAULT_SIGBUS as error otherwise.
+ * successfully, VM_FAULT_SIGBUS or VM_FAULT_OOM as error otherwise.
*/
static vm_fault_t sgx_encl_eaug_page(struct vm_area_struct *vma,
struct sgx_encl *encl, unsigned long addr)
@@ -348,7 +348,7 @@ static vm_fault_t sgx_encl_eaug_page(struct vm_area_struct *vma,
secinfo_flags = SGX_SECINFO_R | SGX_SECINFO_W | SGX_SECINFO_X;
encl_page = sgx_encl_page_alloc(encl, addr - encl->base, secinfo_flags);
if (IS_ERR(encl_page))
- return VM_FAULT_SIGBUS;
+ return VM_FAULT_OOM;
mutex_lock(&encl->lock);
--
2.25.1
next prev parent reply other threads:[~2023-10-26 22:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 8:10 [tip: x86/urgent] x86/sgx: Return VM_FAULT_SIGBUS instead of VM_FAULT_OOM for EPC exhaustion tip-bot2 for Haitao Huang
2023-10-26 22:55 ` Haitao Huang [this message]
2023-10-27 17:21 ` [PATCH] Revert "x86/sgx: Return VM_FAULT_SIGBUS instead of VM_FAULT_OOM for EPC exhaustion" Dave Hansen
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=20231026225528.5738-1-haitao.huang@linux.intel.com \
--to=haitao.huang@linux.intel.com \
--cc=#@tip-bot2.tec.linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tip-bot2@linutronix.de \
--cc=v6.0+@tip-bot2.tec.linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®