From: Jarkko Sakkinen <jarkko@kernel.org>
To: linux-sgx@vger.kernel.org
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
stable@vger.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>,
Jethro Beekman <jethro@fortanix.com>,
Sean Christopherson <seanjc@google.com>
Subject: Re: [PATCH v3] x86/sgx: Free backing memory after faulting the enclave page
Date: Thu, 27 Jan 2022 09:01:43 +0200 [thread overview]
Message-ID: <YfJDV63oGmWOmO4F@iki.fi> (raw)
In-Reply-To: <20220108140510.76583-1-jarkko@kernel.org>
On Sat, Jan 08, 2022 at 04:05:10PM +0200, Jarkko Sakkinen wrote:
> +static inline pgoff_t sgx_encl_get_backing_pcmd_nr(struct sgx_encl *encl, pgoff_t index)
> +{
> + return PFN_DOWN(encl->size) + 1 + (index / sizeof(struct sgx_pcmd));
> +}
Found it.
This should be
static inline pgoff_t sgx_encl_get_backing_pcmd_nr(struct sgx_encl *encl, pgoff_t index)
{
return PFN_DOWN(encl->size) + 1 + (index * PAGE_SIZE) / sizeof(struct sgx_pcmd);
}
/Jarkko
next prev parent reply other threads:[~2022-01-27 7:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-08 14:05 [PATCH v3] x86/sgx: Free backing memory after faulting the enclave page Jarkko Sakkinen
2022-01-13 6:08 ` Reinette Chatre
2022-01-14 21:25 ` Jarkko Sakkinen
2022-01-17 8:30 ` Jarkko Sakkinen
2022-01-24 17:17 ` Dave Hansen
2022-01-26 13:31 ` Jarkko Sakkinen
2022-01-27 7:01 ` Jarkko Sakkinen [this message]
2022-01-31 23:30 ` Dave Hansen
2022-02-20 18:52 ` Jarkko Sakkinen
2022-02-20 18:58 ` Dave Hansen
2022-02-20 20:09 ` Jarkko Sakkinen
2022-02-20 20:42 ` Jarkko Sakkinen
2022-02-22 0:15 ` 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=YfJDV63oGmWOmO4F@iki.fi \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jethro@fortanix.com \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=stable@vger.kernel.org \
--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 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.