]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sgx: Handle VA page allocation failure for EAUG on PF.
authorHaitao Huang <haitao.huang@linux.intel.com>
Tue, 6 Sep 2022 00:02:21 +0000 (03:02 +0300)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 8 Sep 2022 20:28:31 +0000 (13:28 -0700)
commit0e4aabc27326c8e8528a7ac3ae79b48ad33c9a60
treeb663fa38e6e117514f98598a89e64869ea1fe5ed
parent8c81e2436d830fb378dbed2f1f859fb00975de83
x86/sgx: Handle VA page allocation failure for EAUG on PF.

VM_FAULT_NOPAGE is expected behaviour for -EBUSY failure path, when
augmenting a page, as this means that the reclaimer thread has been
triggered, and the intention is just to round-trip in ring-3, and
retry with a new page fault.

Fixes: 63de631cd967 ("x86/sgx: Support adding of pages to an initialized enclave")
Signed-off-by: Haitao Huang <haitao.huang@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20220906000221.34286-3-jarkko@kernel.org
arch/x86/kernel/cpu/sgx/encl.c