Message ID | 21b97a8e9275706f14d6bc652a0f2cfdd5d9648e.1649878359.git.reinette.chatre@intel.com |
---|---|
State | Superseded |
Headers | show |
Series | x86/sgx and selftests/sgx: Support SGX2 | expand |
On Wed, 2022-04-13 at 14:10 -0700, Reinette Chatre wrote: > Enclave runtime management is introduced following the pattern > of the section describing enclave building. Provide a brief > summary of enclave runtime management, pointing to the functions > implementing the ioctl()s that will contain details within their > kernel-doc. > > Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> > --- > No changes since V3. > > Changes since V2: > - Remove references to ioctl() to relax permissions and update to reflect > function renaming sgx_ioc_enclave_restrict_perm() -> > sgx_ioc_enclave_restrict_permissions(). > - Rename sgx_ioc_enclave_modt -> sgx_ioc_enclave_modify_type > > Changes since V1: > - New patch. > > Documentation/x86/sgx.rst | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/Documentation/x86/sgx.rst b/Documentation/x86/sgx.rst > index 265568a9292c..10287c558485 100644 > --- a/Documentation/x86/sgx.rst > +++ b/Documentation/x86/sgx.rst > @@ -100,6 +100,21 @@ pages and establish enclave page permissions. > sgx_ioc_enclave_init > sgx_ioc_enclave_provision > > +Enclave runtime management > +-------------------------- > + > +Systems supporting SGX2 additionally support changes to initialized > +enclaves: modifying enclave page permissions and type, and dynamically > +adding and removing of enclave pages. When an enclave accesses an address > +within its address range that does not have a backing page then a new > +regular page will be dynamically added to the enclave. The enclave is > +still required to run EACCEPT on the new page before it can be used. > + > +.. kernel-doc:: arch/x86/kernel/cpu/sgx/ioctl.c > + :functions: sgx_ioc_enclave_restrict_permissions > + sgx_ioc_enclave_modify_type > + sgx_ioc_enclave_remove_pages > + > Enclave vDSO > ------------ > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> BR, Jarkko
Hi Jarkko, On 4/14/2022 4:21 AM, Jarkko Sakkinen wrote: > On Wed, 2022-04-13 at 14:10 -0700, Reinette Chatre wrote: >> Enclave runtime management is introduced following the pattern >> of the section describing enclave building. Provide a brief >> summary of enclave runtime management, pointing to the functions >> implementing the ioctl()s that will contain details within their >> kernel-doc. >> >> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> >> --- >> No changes since V3. >> >> Changes since V2: >> - Remove references to ioctl() to relax permissions and update to reflect >> function renaming sgx_ioc_enclave_restrict_perm() -> >> sgx_ioc_enclave_restrict_permissions(). >> - Rename sgx_ioc_enclave_modt -> sgx_ioc_enclave_modify_type >> >> Changes since V1: >> - New patch. >> >> Documentation/x86/sgx.rst | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/Documentation/x86/sgx.rst b/Documentation/x86/sgx.rst >> index 265568a9292c..10287c558485 100644 >> --- a/Documentation/x86/sgx.rst >> +++ b/Documentation/x86/sgx.rst >> @@ -100,6 +100,21 @@ pages and establish enclave page permissions. >> sgx_ioc_enclave_init >> sgx_ioc_enclave_provision >> >> +Enclave runtime management >> +-------------------------- >> + >> +Systems supporting SGX2 additionally support changes to initialized >> +enclaves: modifying enclave page permissions and type, and dynamically >> +adding and removing of enclave pages. When an enclave accesses an address >> +within its address range that does not have a backing page then a new >> +regular page will be dynamically added to the enclave. The enclave is >> +still required to run EACCEPT on the new page before it can be used. >> + >> +.. kernel-doc:: arch/x86/kernel/cpu/sgx/ioctl.c >> + :functions: sgx_ioc_enclave_restrict_permissions >> + sgx_ioc_enclave_modify_type >> + sgx_ioc_enclave_remove_pages >> + >> Enclave vDSO >> ------------ >> > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> > Thank you. Reinette
diff --git a/Documentation/x86/sgx.rst b/Documentation/x86/sgx.rst index 265568a9292c..10287c558485 100644 --- a/Documentation/x86/sgx.rst +++ b/Documentation/x86/sgx.rst @@ -100,6 +100,21 @@ pages and establish enclave page permissions. sgx_ioc_enclave_init sgx_ioc_enclave_provision +Enclave runtime management +-------------------------- + +Systems supporting SGX2 additionally support changes to initialized +enclaves: modifying enclave page permissions and type, and dynamically +adding and removing of enclave pages. When an enclave accesses an address +within its address range that does not have a backing page then a new +regular page will be dynamically added to the enclave. The enclave is +still required to run EACCEPT on the new page before it can be used. + +.. kernel-doc:: arch/x86/kernel/cpu/sgx/ioctl.c + :functions: sgx_ioc_enclave_restrict_permissions + sgx_ioc_enclave_modify_type + sgx_ioc_enclave_remove_pages + Enclave vDSO ------------
Enclave runtime management is introduced following the pattern of the section describing enclave building. Provide a brief summary of enclave runtime management, pointing to the functions implementing the ioctl()s that will contain details within their kernel-doc. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> --- No changes since V3. Changes since V2: - Remove references to ioctl() to relax permissions and update to reflect function renaming sgx_ioc_enclave_restrict_perm() -> sgx_ioc_enclave_restrict_permissions(). - Rename sgx_ioc_enclave_modt -> sgx_ioc_enclave_modify_type Changes since V1: - New patch. Documentation/x86/sgx.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+)