Baseline before adding Sean's updates. This contains only my updates. I spent this day mostly fixing diff's. Especially these two were somewhat unclean: 1. x86/sgx: Add a page reclaimer 2. x86/sgx: Linux Enclave Driver Now they pile up nicely (I think). So I decided to do this tag since now commit's in the sense of form and shape are legit. And also because things, well, work. I'll continue from this by integrating Sean's changes. You can see below what has been already changed. /Jarkko tag v23-rc1 Tagger: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx> Date: Wed Oct 9 16:59:10 2019 +0300 x86/sgx: v23-rc1 patch set * Return -EIO instead of -ECANCELED when ptrace() fails to read a TCS page. * In the reclaimer, pin page before ENCLS[EBLOCK] because pinning can fail (because of OOM) even in legit behaviour and after EBLOCK the reclaiming flow can be only reverted by killing the whole enclave. * Fixed SGX_ATTR_RESERVED_MASK. Bit 7 was marked as reserved while in fact it should have been bit 6 (Table 37-3 in the SDM). * Return -EPERM from SGX_IOC_ENCLAVE_INIT when ENCLS[EINIT] returns an SGX error code. -----BEGIN PGP SIGNATURE----- iJYEABYIAD4WIQRE6pSOnaBC00OEHEIaerohdGur0gUCXZ3nxCAcamFya2tvLnNh a2tpbmVuQGxpbnV4LmludGVsLmNvbQAKCRAaerohdGur0mKVAQDcmIGs2f8y8hDY b7zaQdNbaAMgsEkQ3ohMA88fbm2UQwD+P7y5AcAxzdccbgh++7RDy6XR2Ow2pluW vCGUvRAhgwY= =LCI3 -----END PGP SIGNATURE----- /Jarkko