From: Dave Hansen <dave.hansen@intel.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
linux-integrity@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arch/x86: Fix size overflows in sgx_encl_create()
Date: Tue, 4 Mar 2025 16:18:03 -0800 [thread overview]
Message-ID: <8255b211-5510-4c09-b13f-c4e3bd0d0aba@intel.com> (raw)
In-Reply-To: <20250305000602.127665-1-jarkko@kernel.org>
On 3/4/25 16:06, Jarkko Sakkinen wrote:
> + /*
> + * This is a micro-architectural requirement. ECREATE would detect this
> + * too without mentionable overhead but this check guarantees also that
> + * the space calculations for EPC and shmem allocations never overflow.
> + */
> + if (!is_power_of_2(secs->size))
> + return -EINVAL;
Isn't it a plain old documented architectural requirement?
next prev parent reply other threads:[~2025-03-05 0:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 0:06 [PATCH v2] arch/x86: Fix size overflows in sgx_encl_create() Jarkko Sakkinen
2025-03-05 0:09 ` Jarkko Sakkinen
2025-03-05 0:18 ` Dave Hansen [this message]
2025-03-05 0:19 ` Jarkko Sakkinen
2025-03-05 0:30 ` Dave Hansen
2025-03-05 1:26 ` 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=8255b211-5510-4c09-b13f-c4e3bd0d0aba@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dan.carpenter@linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.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 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.