From: Elena Reshetova <elena.reshetova@intel.com>
To: dave.hansen@intel.com
Cc: jarkko@kernel.org, seanjc@google.com, kai.huang@intel.com,
mingo@kernel.org, linux-sgx@vger.kernel.org,
linux-kernel@vger.kernel.org, x86@kernel.org,
asit.k.mallick@intel.com, vincent.r.scarlata@intel.com,
chongc@google.com, erdemaktas@google.com, vannapurve@google.com,
bondarn@google.com, scott.raynor@intel.com,
Elena Reshetova <elena.reshetova@intel.com>
Subject: [PATCH v9 1/6] x86/sgx: Convert sgx_(vepc_)open to __sgx_(vepc_)open
Date: Thu, 24 Jul 2025 11:02:10 +0300 [thread overview]
Message-ID: <20250724080313.605676-2-elena.reshetova@intel.com> (raw)
In-Reply-To: <20250724080313.605676-1-elena.reshetova@intel.com>
In order to introduce the counting of active sgx users on top
of clean functions that allocate vepc structures, covert existing
sgx_(vepc_)open to __sgx_(vepc_)open. Later patch will introduce the
top level wrappers that manage the usage count.
No functional change intended in this patch.
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
---
arch/x86/kernel/cpu/sgx/driver.c | 4 ++--
arch/x86/kernel/cpu/sgx/virt.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/sgx/driver.c b/arch/x86/kernel/cpu/sgx/driver.c
index 7f8d1e11dbee..9aa48f455c54 100644
--- a/arch/x86/kernel/cpu/sgx/driver.c
+++ b/arch/x86/kernel/cpu/sgx/driver.c
@@ -14,7 +14,7 @@ u64 sgx_attributes_reserved_mask;
u64 sgx_xfrm_reserved_mask = ~0x3;
u32 sgx_misc_reserved_mask;
-static int sgx_open(struct inode *inode, struct file *file)
+static int __sgx_open(struct inode *inode, struct file *file)
{
struct sgx_encl *encl;
int ret;
@@ -126,7 +126,7 @@ static long sgx_compat_ioctl(struct file *filep, unsigned int cmd,
static const struct file_operations sgx_encl_fops = {
.owner = THIS_MODULE,
- .open = sgx_open,
+ .open = __sgx_open,
.release = sgx_release,
.unlocked_ioctl = sgx_ioctl,
#ifdef CONFIG_COMPAT
diff --git a/arch/x86/kernel/cpu/sgx/virt.c b/arch/x86/kernel/cpu/sgx/virt.c
index 7aaa3652e31d..d8fdf7f39215 100644
--- a/arch/x86/kernel/cpu/sgx/virt.c
+++ b/arch/x86/kernel/cpu/sgx/virt.c
@@ -258,7 +258,7 @@ static int sgx_vepc_release(struct inode *inode, struct file *file)
return 0;
}
-static int sgx_vepc_open(struct inode *inode, struct file *file)
+static int __sgx_vepc_open(struct inode *inode, struct file *file)
{
struct sgx_vepc *vepc;
@@ -291,7 +291,7 @@ static long sgx_vepc_ioctl(struct file *file,
static const struct file_operations sgx_vepc_fops = {
.owner = THIS_MODULE,
- .open = sgx_vepc_open,
+ .open = __sgx_vepc_open,
.unlocked_ioctl = sgx_vepc_ioctl,
.compat_ioctl = sgx_vepc_ioctl,
.release = sgx_vepc_release,
--
2.45.2
next prev parent reply other threads:[~2025-07-24 8:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 8:02 [PATCH v9 0/6] Enable automatic SVN updates for SGX enclaves Elena Reshetova
2025-07-24 8:02 ` Elena Reshetova [this message]
2025-07-24 8:02 ` [PATCH v9 2/6] x86/sgx: Introduce a counter to count the sgx_(vepc_)open() Elena Reshetova
2025-07-24 10:24 ` Huang, Kai
2025-07-24 12:33 ` Reshetova, Elena
2025-07-24 8:02 ` [PATCH v9 3/6] x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag Elena Reshetova
2025-07-24 8:02 ` [PATCH v9 4/6] x86/sgx: Define error codes for use by ENCLS[EUPDATESVN] Elena Reshetova
2025-07-24 8:02 ` [PATCH v9 5/6] x86/sgx: Implement ENCLS[EUPDATESVN] Elena Reshetova
2025-07-24 8:02 ` [PATCH v9 6/6] x86/sgx: Enable automatic SVN updates for SGX enclaves Elena Reshetova
2025-07-24 10:18 ` Huang, Kai
2025-07-24 12:40 ` Reshetova, Elena
2025-07-24 11:12 ` Huang, Kai
2025-07-24 12:47 ` Reshetova, Elena
2025-07-24 21:14 ` Huang, Kai
2025-07-24 21:43 ` Huang, Kai
2025-07-28 15:45 ` Reshetova, Elena
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=20250724080313.605676-2-elena.reshetova@intel.com \
--to=elena.reshetova@intel.com \
--cc=asit.k.mallick@intel.com \
--cc=bondarn@google.com \
--cc=chongc@google.com \
--cc=dave.hansen@intel.com \
--cc=erdemaktas@google.com \
--cc=jarkko@kernel.org \
--cc=kai.huang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=scott.raynor@intel.com \
--cc=seanjc@google.com \
--cc=vannapurve@google.com \
--cc=vincent.r.scarlata@intel.com \
--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®