[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176065159743.709179.17232165280940116721.tip-bot2@tip-bot2>
Date: Thu, 16 Oct 2025 21:53:17 -0000
From: "tip-bot2 for Elena Reshetova" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Elena Reshetova <elena.reshetova@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, Kai Huang <kai.huang@...el.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
Nataliia Bondarevska <bondarn@...gle.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: x86/sgx] x86/sgx: Define error codes for use by ENCLS[EUPDATESVN]
The following commit has been merged into the x86/sgx branch of tip:
Commit-ID: 7b502832ee69274ce88faa5d64a339f8760b50bf
Gitweb: https://git.kernel.org/tip/7b502832ee69274ce88faa5d64a339f8760b50bf
Author: Elena Reshetova <elena.reshetova@...el.com>
AuthorDate: Thu, 16 Oct 2025 16:11:06 +03:00
Committer: Dave Hansen <dave.hansen@...ux.intel.com>
CommitterDate: Thu, 16 Oct 2025 14:42:09 -07:00
x86/sgx: Define error codes for use by ENCLS[EUPDATESVN]
Add error codes for ENCLS[EUPDATESVN], then SGX CPUSVN update process can
know the execution state of EUPDATESVN and notify userspace.
EUPDATESVN will be called when no active SGX users is guaranteed. Only add
the error codes that can legally happen. E.g., it could also fail due to
"SGX not ready" when there's SGX users but it wouldn't happen in this
implementation.
Signed-off-by: Elena Reshetova <elena.reshetova@...el.com>
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Reviewed-by: Kai Huang <kai.huang@...el.com>
Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>
Tested-by: Nataliia Bondarevska <bondarn@...gle.com>
---
arch/x86/include/asm/sgx.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/include/asm/sgx.h b/arch/x86/include/asm/sgx.h
index 6a00697..73348cf 100644
--- a/arch/x86/include/asm/sgx.h
+++ b/arch/x86/include/asm/sgx.h
@@ -73,6 +73,10 @@ enum sgx_encls_function {
* public key does not match IA32_SGXLEPUBKEYHASH.
* %SGX_PAGE_NOT_MODIFIABLE: The EPC page cannot be modified because it
* is in the PENDING or MODIFIED state.
+ * %SGX_INSUFFICIENT_ENTROPY: Insufficient entropy in RNG.
+ * %SGX_NO_UPDATE: EUPDATESVN could not update the CPUSVN because the
+ * current SVN was not newer than CPUSVN. This is the most
+ * common error code returned by EUPDATESVN.
* %SGX_UNMASKED_EVENT: An unmasked event, e.g. INTR, was received
*/
enum sgx_return_code {
@@ -81,6 +85,8 @@ enum sgx_return_code {
SGX_CHILD_PRESENT = 13,
SGX_INVALID_EINITTOKEN = 16,
SGX_PAGE_NOT_MODIFIABLE = 20,
+ SGX_INSUFFICIENT_ENTROPY = 29,
+ SGX_NO_UPDATE = 31,
SGX_UNMASKED_EVENT = 128,
};
Powered by blists - more mailing lists