[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9ae406e8751b2969322be83ea5afba08e0d6e13.camel@intel.com>
Date: Wed, 21 Aug 2024 11:11:51 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Kuvaiskii, Dmitrii" <dmitrii.kuvaiskii@...el.com>,
"linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>, "Chatre, Reinette"
<reinette.chatre@...el.com>, "jarkko@...nel.org" <jarkko@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"haitao.huang@...ux.intel.com" <haitao.huang@...ux.intel.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC: "stable@...r.kernel.org" <stable@...r.kernel.org>, "Vij, Mona"
<mona.vij@...el.com>, "Qin, Kailun" <kailun.qin@...el.com>
Subject: Re: [PATCH v5 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data
race
[...]
>
> Additionally fix a similar race: user space converts a normal enclave
> page to a TCS page (via SGX_IOC_ENCLAVE_MODIFY_TYPES) on CPU1, and at
> the same time, user space performs a memory access on the same page on
> CPU2. This fix is not strictly necessary (this particular race would
> indicate a bug in a user space application), but it gives a consistent
> rule: if an enclave page is under certain operation by the kernel with
> the mapping removed, then other threads trying to access that page are
> temporarily blocked and should retry.
>
> Fixes: 9849bb27152c ("x86/sgx: Support complete page removal")
> Cc: stable@...r.kernel.org
> Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@...el.com>
This also needs another Fixes tag:
Fixes: 45d546b8c109d ("x86/sgx: Support modifying SGX page type")
.. since this patch fixes two functions introduced by two patches.
Maybe it's better to split this into two patches with each have one Fixes tag,
but I think it should also be fine to have two Fixes tags in this one patch
(I've seen that before), because all SGX2 patches were merged together in the
same kernel release.
Reviewed-by: Kai Huang <kai.huang@...el.com>
Powered by blists - more mailing lists