From: jarkko@kernel.org
To: linux-sgx@vger.kernel.org
Cc: dave.hansen@intel.com, kai.huang@intel.com,
haitao.huang@intel.com, seanjc@google.com,
"jarkko@kernel.org" <jarkko@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH v4 1/2] x86/sgx: Remove a warn from sgx_free_epc_page()
Date: Thu, 14 Jan 2021 01:35:40 +0200 [thread overview]
Message-ID: <20210113233541.17669-2-jarkko@kernel.org> (raw)
In-Reply-To: <20210113233541.17669-1-jarkko@kernel.org>
From: "jarkko@kernel.org" <jarkko@kernel.org>
Remove SGX_EPC_PAGE_RECLAIMER_TRACKED check and warning. This cannot
happen, as enclave pages are freed only at the time when encl->refcount
triggers, i.e. when both VFS and the page reclaimer have given up on
their references.
Signed-off-by: jarkko@kernel.org <jarkko@kernel.org>
---
arch/x86/kernel/cpu/sgx/main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index c519fc5f6948..ebbd3b97b3d0 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -605,8 +605,6 @@ void sgx_free_epc_page(struct sgx_epc_page *page)
struct sgx_epc_section *section = &sgx_epc_sections[page->section];
int ret;
- WARN_ON_ONCE(page->flags & SGX_EPC_PAGE_RECLAIMER_TRACKED);
-
ret = __eremove(sgx_get_epc_virt_addr(page));
if (WARN_ONCE(ret, "EREMOVE returned %d (0x%x)", ret, ret))
return;
--
2.29.2
next prev parent reply other threads:[~2021-01-14 1:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 23:35 [PATCH v4 0/2] Take away EREMOVE from sgx_free_epc_page() jarkko
2021-01-13 23:35 ` jarkko [this message]
2021-01-13 23:35 ` [PATCH v4 2/2] x86/sgx: Wipe out " jarkko
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=20210113233541.17669-2-jarkko@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=haitao.huang@intel.com \
--cc=hpa@zytor.com \
--cc=kai.huang@intel.com \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@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;
as well as URLs for NNTP newsgroup(s).