€•=uŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/tee/op-tee”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/tee/op-tee”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/tee/op-tee”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/tee/op-tee”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/tee/op-tee”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/tee/op-tee”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒ8/var/lib/git/docbuild/linux/Documentation/tee/op-tee.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ4OP-TEE (Open Portable Trusted Execution Environment)”h]”hŒ4OP-TEE (Open Portable Trusted Execution Environment)”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hŒ€The OP-TEE driver handles OP-TEE [1] based TEEs. Currently it is only the ARM TrustZone based OP-TEE solution that is supported.”h]”hŒ€The OP-TEE driver handles OP-TEE [1] based TEEs. Currently it is only the ARM TrustZone based OP-TEE solution that is supported.”…””}”(hhËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhÊ)”}”(hŒèLowest level of communication with OP-TEE builds on ARM SMC Calling Convention (SMCCC) [2], which is the foundation for OP-TEE's SMC interface [3] used internally by the driver. Stacked on top of that is OP-TEE Message Protocol [4].”h]”hŒêLowest level of communication with OP-TEE builds on ARM SMC Calling Convention (SMCCC) [2], which is the foundation for OP-TEE’s SMC interface [3] used internally by the driver. Stacked on top of that is OP-TEE Message Protocol [4].”…””}”(hhÙhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hh¶hžhubhÊ)”}”(hŒšOP-TEE SMC interface provides the basic functions required by SMCCC and some additional functions specific for OP-TEE. The most interesting functions are:”h]”hŒšOP-TEE SMC interface provides the basic functions required by SMCCC and some additional functions specific for OP-TEE. The most interesting functions are:”…””}”(hhçhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒuOPTEE_SMC_FUNCID_CALLS_UID (part of SMCCC) returns the version information which is then returned by TEE_IOC_VERSION ”h]”hÊ)”}”(hŒtOPTEE_SMC_FUNCID_CALLS_UID (part of SMCCC) returns the version information which is then returned by TEE_IOC_VERSION”h]”hŒtOPTEE_SMC_FUNCID_CALLS_UID (part of SMCCC) returns the version information which is then returned by TEE_IOC_VERSION”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khhüubah}”(h]”h ]”h"]”h$]”h&]”uh1húhh÷hžhhŸh³h Nubhû)”}”(hŒ¸OPTEE_SMC_CALL_GET_OS_UUID returns the particular OP-TEE implementation, used to tell, for instance, a TrustZone OP-TEE apart from an OP-TEE running on a separate secure co-processor. ”h]”hÊ)”}”(hŒ·OPTEE_SMC_CALL_GET_OS_UUID returns the particular OP-TEE implementation, used to tell, for instance, a TrustZone OP-TEE apart from an OP-TEE running on a separate secure co-processor.”h]”hŒ·OPTEE_SMC_CALL_GET_OS_UUID returns the particular OP-TEE implementation, used to tell, for instance, a TrustZone OP-TEE apart from an OP-TEE running on a separate secure co-processor.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1húhh÷hžhhŸh³h Nubhû)”}”(hŒ;OPTEE_SMC_CALL_WITH_ARG drives the OP-TEE message protocol ”h]”hÊ)”}”(hŒ:OPTEE_SMC_CALL_WITH_ARG drives the OP-TEE message protocol”h]”hŒ:OPTEE_SMC_CALL_WITH_ARG drives the OP-TEE message protocol”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1húhh÷hžhhŸh³h Nubhû)”}”(hŒ„OPTEE_SMC_GET_SHM_CONFIG lets the driver and OP-TEE agree on which memory range to used for shared memory between Linux and OP-TEE. ”h]”hÊ)”}”(hŒƒOPTEE_SMC_GET_SHM_CONFIG lets the driver and OP-TEE agree on which memory range to used for shared memory between Linux and OP-TEE.”h]”hŒƒOPTEE_SMC_GET_SHM_CONFIG lets the driver and OP-TEE agree on which memory range to used for shared memory between Linux and OP-TEE.”…””}”(hjHhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjDubah}”(h]”h ]”h"]”h$]”h&]”uh1húhh÷hžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1hõhŸh³h Khh¶hžhubhÊ)”}”(hŒSThe GlobalPlatform TEE Client API [5] is implemented on top of the generic TEE API.”h]”hŒSThe GlobalPlatform TEE Client API [5] is implemented on top of the generic TEE API.”…””}”(hjdhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhÊ)”}”(hŒYPicture of the relationship between the different components in the OP-TEE architecture::”h]”hŒXPicture of the relationship between the different components in the OP-TEE architecture:”…””}”(hjrhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K!hh¶hžhubhŒ literal_block”“”)”}”(hX+ User space Kernel Secure world ~~~~~~~~~~ ~~~~~~ ~~~~~~~~~~~~ +--------+ +-------------+ | Client | | Trusted | +--------+ | Application | /\ +-------------+ || +----------+ /\ || |tee- | || || |supplicant| \/ || +----------+ +-------------+ \/ /\ | TEE Internal| +-------+ || | API | + TEE | || +--------+--------+ +-------------+ | Client| || | TEE | OP-TEE | | OP-TEE | | API | \/ | subsys | driver | | Trusted OS | +-------+----------------+----+-------+----+-----------+-------------+ | Generic TEE API | | OP-TEE MSG | | IOCTL (TEE_IOC_*) | | SMCCC (OPTEE_SMC_CALL_*) | +-----------------------------+ +------------------------------+”h]”hX+ User space Kernel Secure world ~~~~~~~~~~ ~~~~~~ ~~~~~~~~~~~~ +--------+ +-------------+ | Client | | Trusted | +--------+ | Application | /\ +-------------+ || +----------+ /\ || |tee- | || || |supplicant| \/ || +----------+ +-------------+ \/ /\ | TEE Internal| +-------+ || | API | + TEE | || +--------+--------+ +-------------+ | Client| || | TEE | OP-TEE | | OP-TEE | | API | \/ | subsys | driver | | Trusted OS | +-------+----------------+----+-------+----+-----------+-------------+ | Generic TEE API | | OP-TEE MSG | | IOCTL (TEE_IOC_*) | | SMCCC (OPTEE_SMC_CALL_*) | +-----------------------------+ +------------------------------+”…””}”hj‚sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j€hŸh³h K$hh¶hžhubhÊ)”}”(hX¤RPC (Remote Procedure Call) are requests from secure world to kernel driver or tee-supplicant. An RPC is identified by a special range of SMCCC return values from OPTEE_SMC_CALL_WITH_ARG. RPC messages which are intended for the kernel are handled by the kernel driver. Other RPC messages will be forwarded to tee-supplicant without further involvement of the driver, except switching shared memory buffer representation.”h]”hX¤RPC (Remote Procedure Call) are requests from secure world to kernel driver or tee-supplicant. An RPC is identified by a special range of SMCCC return values from OPTEE_SMC_CALL_WITH_ARG. RPC messages which are intended for the kernel are handled by the kernel driver. Other RPC messages will be forwarded to tee-supplicant without further involvement of the driver, except switching shared memory buffer representation.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K8hh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒOP-TEE device enumeration”h]”hŒOP-TEE device enumeration”…””}”(hj¡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjžhžhhŸh³h K@ubhÊ)”}”(hXOP-TEE provides a pseudo Trusted Application: drivers/tee/optee/device.c in order to support device enumeration. In other words, OP-TEE driver invokes this application to retrieve a list of Trusted Applications which can be registered as devices on the TEE bus.”h]”hXOP-TEE provides a pseudo Trusted Application: drivers/tee/optee/device.c in order to support device enumeration. In other words, OP-TEE driver invokes this application to retrieve a list of Trusted Applications which can be registered as devices on the TEE bus.”…””}”(hj¯hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KBhjžhžhubeh}”(h]”Œop-tee-device-enumeration”ah ]”h"]”Œop-tee device enumeration”ah$]”h&]”uh1h´hh¶hžhhŸh³h K@ubhµ)”}”(hhh]”(hº)”}”(hŒOP-TEE notifications”h]”hŒOP-TEE notifications”…””}”(hjÈhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjÅhžhhŸh³h KHubhÊ)”}”(hŒhThere are two kinds of notifications that secure world can use to make normal world aware of some event.”h]”hŒhThere are two kinds of notifications that secure world can use to make normal world aware of some event.”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KJhjÅhžhubhŒenumerated_list”“”)”}”(hhh]”(hû)”}”(hŒ|Synchronous notifications delivered with ``OPTEE_RPC_CMD_NOTIFICATION`` using the ``OPTEE_RPC_NOTIFICATION_SEND`` parameter.”h]”hÊ)”}”(hŒ|Synchronous notifications delivered with ``OPTEE_RPC_CMD_NOTIFICATION`` using the ``OPTEE_RPC_NOTIFICATION_SEND`` parameter.”h]”(hŒ)Synchronous notifications delivered with ”…””}”(hjíhžhhŸNh NubhŒliteral”“”)”}”(hŒ``OPTEE_RPC_CMD_NOTIFICATION``”h]”hŒOPTEE_RPC_CMD_NOTIFICATION”…””}”(hj÷hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjíubhŒ using the ”…””}”(hjíhžhhŸNh Nubjö)”}”(hŒ``OPTEE_RPC_NOTIFICATION_SEND``”h]”hŒOPTEE_RPC_NOTIFICATION_SEND”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjíubhŒ parameter.”…””}”(hjíhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KMhjéubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjæhžhhŸh³h Nubhû)”}”(hŒ˜Asynchronous notifications delivered with a combination of a non-secure edge-triggered interrupt and a fast call from the non-secure interrupt handler. ”h]”hÊ)”}”(hŒ—Asynchronous notifications delivered with a combination of a non-secure edge-triggered interrupt and a fast call from the non-secure interrupt handler.”h]”hŒ—Asynchronous notifications delivered with a combination of a non-secure edge-triggered interrupt and a fast call from the non-secure interrupt handler.”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KOhj'ubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjæhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1jähjÅhžhhŸh³h KMubhÊ)”}”(hŒõSynchronous notifications are limited by depending on RPC for delivery, this is only usable when secure world is entered with a yielding call via ``OPTEE_SMC_CALL_WITH_ARG``. This excludes such notifications from secure world interrupt handlers.”h]”(hŒ’Synchronous notifications are limited by depending on RPC for delivery, this is only usable when secure world is entered with a yielding call via ”…””}”(hjJhžhhŸNh Nubjö)”}”(hŒ``OPTEE_SMC_CALL_WITH_ARG``”h]”hŒOPTEE_SMC_CALL_WITH_ARG”…””}”(hjRhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjJubhŒH. This excludes such notifications from secure world interrupt handlers.”…””}”(hjJhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KShjÅhžhubhÊ)”}”(hX.An asynchronous notification is delivered via a non-secure edge-triggered interrupt to an interrupt handler registered in the OP-TEE driver. The actual notification value are retrieved with the fast call ``OPTEE_SMC_GET_ASYNC_NOTIF_VALUE``. Note that one interrupt can represent multiple notifications.”h]”(hŒÌAn asynchronous notification is delivered via a non-secure edge-triggered interrupt to an interrupt handler registered in the OP-TEE driver. The actual notification value are retrieved with the fast call ”…””}”(hjjhžhhŸNh Nubjö)”}”(hŒ#``OPTEE_SMC_GET_ASYNC_NOTIF_VALUE``”h]”hŒOPTEE_SMC_GET_ASYNC_NOTIF_VALUE”…””}”(hjrhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjjubhŒ?. Note that one interrupt can represent multiple notifications.”…””}”(hjjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KXhjÅhžhubhÊ)”}”(hX–One notification value ``OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF`` has a special meaning. When this value is received it means that normal world is supposed to make a yielding call ``OPTEE_MSG_CMD_DO_BOTTOM_HALF``. This call is done from the thread assisting the interrupt handler. This is a building block for OP-TEE OS in secure world to implement the top half and bottom half style of device drivers.”h]”(hŒOne notification value ”…””}”(hjŠhžhhŸNh Nubjö)”}”(hŒ.``OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF``”h]”hŒ*OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF”…””}”(hj’hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjŠubhŒs has a special meaning. When this value is received it means that normal world is supposed to make a yielding call ”…””}”(hjŠhžhhŸNh Nubjö)”}”(hŒ ``OPTEE_MSG_CMD_DO_BOTTOM_HALF``”h]”hŒOPTEE_MSG_CMD_DO_BOTTOM_HALF”…””}”(hj¤hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjŠubhŒ¾. This call is done from the thread assisting the interrupt handler. This is a building block for OP-TEE OS in secure world to implement the top half and bottom half style of device drivers.”…””}”(hjŠhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K^hjÅhžhubeh}”(h]”Œop-tee-notifications”ah ]”h"]”Œop-tee notifications”ah$]”h&]”uh1h´hh¶hžhhŸh³h KHubhµ)”}”(hhh]”(hº)”}”(hŒ(OPTEE_INSECURE_LOAD_IMAGE Kconfig option”h]”hŒ(OPTEE_INSECURE_LOAD_IMAGE Kconfig option”…””}”(hjÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjÄhžhhŸh³h KfubhÊ)”}”(hX¿The OPTEE_INSECURE_LOAD_IMAGE Kconfig option enables the ability to load the BL32 OP-TEE image from the kernel after the kernel boots, rather than loading it from the firmware before the kernel boots. This also requires enabling the corresponding option in Trusted Firmware for Arm. The Trusted Firmware for Arm documentation [6] explains the security threat associated with enabling this as well as mitigations at the firmware and platform level.”h]”hX¿The OPTEE_INSECURE_LOAD_IMAGE Kconfig option enables the ability to load the BL32 OP-TEE image from the kernel after the kernel boots, rather than loading it from the firmware before the kernel boots. This also requires enabling the corresponding option in Trusted Firmware for Arm. The Trusted Firmware for Arm documentation [6] explains the security threat associated with enabling this as well as mitigations at the firmware and platform level.”…””}”(hjÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhhjÄhžhubhÊ)”}”(hŒoThere are additional attack vectors/mitigations for the kernel that should be addressed when using this option.”h]”hŒoThere are additional attack vectors/mitigations for the kernel that should be addressed when using this option.”…””}”(hjãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KohjÄhžhubjå)”}”(hhh]”(hû)”}”(hX%Boot chain security. * Attack vector: Replace the OP-TEE OS image in the rootfs to gain control of the system. * Mitigation: There must be boot chain security that verifies the kernel and rootfs, otherwise an attacker can modify the loaded OP-TEE binary by modifying it in the rootfs. ”h]”(hÊ)”}”(hŒBoot chain security.”h]”hŒBoot chain security.”…””}”(hjøhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Krhjôubhö)”}”(hhh]”(hû)”}”(hŒXAttack vector: Replace the OP-TEE OS image in the rootfs to gain control of the system. ”h]”hÊ)”}”(hŒWAttack vector: Replace the OP-TEE OS image in the rootfs to gain control of the system.”h]”hŒWAttack vector: Replace the OP-TEE OS image in the rootfs to gain control of the system.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Kthj ubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjubhû)”}”(hŒ¬Mitigation: There must be boot chain security that verifies the kernel and rootfs, otherwise an attacker can modify the loaded OP-TEE binary by modifying it in the rootfs. ”h]”hÊ)”}”(hŒ«Mitigation: There must be boot chain security that verifies the kernel and rootfs, otherwise an attacker can modify the loaded OP-TEE binary by modifying it in the rootfs.”h]”hŒ«Mitigation: There must be boot chain security that verifies the kernel and rootfs, otherwise an attacker can modify the loaded OP-TEE binary by modifying it in the rootfs.”…””}”(hj%hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Kwhj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjubeh}”(h]”h ]”h"]”h$]”h&]”jbŒ*”uh1hõhŸh³h Kthjôubeh}”(h]”h ]”h"]”h$]”h&]”uh1húhjñhžhhŸNh Nubhû)”}”(hXCAlternate boot modes. * Attack vector: Using an alternate boot mode (i.e. recovery mode), the OP-TEE driver isn't loaded, leaving the SMC hole open. * Mitigation: If there are alternate methods of booting the device, such as a recovery mode, it should be ensured that the same mitigations are applied in that mode. ”h]”(hÊ)”}”(hŒAlternate boot modes.”h]”hŒAlternate boot modes.”…””}”(hjJhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K{hjFubhö)”}”(hhh]”(hû)”}”(hŒ}Attack vector: Using an alternate boot mode (i.e. recovery mode), the OP-TEE driver isn't loaded, leaving the SMC hole open. ”h]”hÊ)”}”(hŒ|Attack vector: Using an alternate boot mode (i.e. recovery mode), the OP-TEE driver isn't loaded, leaving the SMC hole open.”h]”hŒ~Attack vector: Using an alternate boot mode (i.e. recovery mode), the OP-TEE driver isn’t loaded, leaving the SMC hole open.”…””}”(hj_hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K}hj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjXubhû)”}”(hŒ¤Mitigation: If there are alternate methods of booting the device, such as a recovery mode, it should be ensured that the same mitigations are applied in that mode. ”h]”hÊ)”}”(hŒ£Mitigation: If there are alternate methods of booting the device, such as a recovery mode, it should be ensured that the same mitigations are applied in that mode.”h]”hŒ£Mitigation: If there are alternate methods of booting the device, such as a recovery mode, it should be ensured that the same mitigations are applied in that mode.”…””}”(hjwhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K€hjsubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjXubeh}”(h]”h ]”h"]”h$]”h&]”jbj?uh1hõhŸh³h K}hjFubeh}”(h]”h ]”h"]”h$]”h&]”uh1húhjñhžhhŸNh Nubhû)”}”(hXžAttacks prior to SMC invocation. * Attack vector: Code that is executed prior to issuing the SMC call to load OP-TEE can be exploited to then load an alternate OS image. * Mitigation: The OP-TEE driver must be loaded before any potential attack vectors are opened up. This should include mounting of any modifiable filesystems, opening of network ports or communicating with external devices (e.g. USB). ”h]”(hÊ)”}”(hŒ Attacks prior to SMC invocation.”h]”hŒ Attacks prior to SMC invocation.”…””}”(hj›hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K„hj—ubhö)”}”(hhh]”(hû)”}”(hŒ‡Attack vector: Code that is executed prior to issuing the SMC call to load OP-TEE can be exploited to then load an alternate OS image. ”h]”hÊ)”}”(hŒ†Attack vector: Code that is executed prior to issuing the SMC call to load OP-TEE can be exploited to then load an alternate OS image.”h]”hŒ†Attack vector: Code that is executed prior to issuing the SMC call to load OP-TEE can be exploited to then load an alternate OS image.”…””}”(hj°hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K†hj¬ubah}”(h]”h ]”h"]”h$]”h&]”uh1húhj©ubhû)”}”(hŒèMitigation: The OP-TEE driver must be loaded before any potential attack vectors are opened up. This should include mounting of any modifiable filesystems, opening of network ports or communicating with external devices (e.g. USB). ”h]”hÊ)”}”(hŒçMitigation: The OP-TEE driver must be loaded before any potential attack vectors are opened up. This should include mounting of any modifiable filesystems, opening of network ports or communicating with external devices (e.g. USB).”h]”hŒçMitigation: The OP-TEE driver must be loaded before any potential attack vectors are opened up. This should include mounting of any modifiable filesystems, opening of network ports or communicating with external devices (e.g. USB).”…””}”(hjÈhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K‰hjÄubah}”(h]”h ]”h"]”h$]”h&]”uh1húhj©ubeh}”(h]”h ]”h"]”h$]”h&]”jbj?uh1hõhŸh³h K†hj—ubeh}”(h]”h ]”h"]”h$]”h&]”uh1húhjñhžhhŸNh Nubhû)”}”(hX‡Blocking SMC call to load OP-TEE. * Attack vector: Prevent the driver from being probed, so the SMC call to load OP-TEE isn't executed when desired, leaving it open to being executed later and loading a modified OS. * Mitigation: It is recommended to build the OP-TEE driver as builtin driver rather than as a module to prevent exploits that may cause the module to not be loaded. ”h]”(hÊ)”}”(hŒ!Blocking SMC call to load OP-TEE.”h]”hŒ!Blocking SMC call to load OP-TEE.”…””}”(hjìhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KŽhjèubhö)”}”(hhh]”(hû)”}”(hŒ´Attack vector: Prevent the driver from being probed, so the SMC call to load OP-TEE isn't executed when desired, leaving it open to being executed later and loading a modified OS. ”h]”hÊ)”}”(hŒ³Attack vector: Prevent the driver from being probed, so the SMC call to load OP-TEE isn't executed when desired, leaving it open to being executed later and loading a modified OS.”h]”hŒµAttack vector: Prevent the driver from being probed, so the SMC call to load OP-TEE isn’t executed when desired, leaving it open to being executed later and loading a modified OS.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khjýubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjúubhû)”}”(hŒ£Mitigation: It is recommended to build the OP-TEE driver as builtin driver rather than as a module to prevent exploits that may cause the module to not be loaded. ”h]”hÊ)”}”(hŒ¢Mitigation: It is recommended to build the OP-TEE driver as builtin driver rather than as a module to prevent exploits that may cause the module to not be loaded.”h]”hŒ¢Mitigation: It is recommended to build the OP-TEE driver as builtin driver rather than as a module to prevent exploits that may cause the module to not be loaded.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K”hjubah}”(h]”h ]”h"]”h$]”h&]”uh1húhjúubeh}”(h]”h ]”h"]”h$]”h&]”jbj?uh1hõhŸh³h Khjèubeh}”(h]”h ]”h"]”h$]”h&]”uh1húhjñhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”jEjFjGhjHjIuh1jähjÄhžhhŸh³h Krubhµ)”}”(hhh]”(hº)”}”(hŒ References”h]”hŒ References”…””}”(hjBhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj?hžhhŸh³h K™ubhÊ)”}”(hŒ&[1] https://github.com/OP-TEE/optee_os”h]”(hŒ[1] ”…””}”(hjPhžhhŸNh NubhŒ reference”“”)”}”(hŒ"https://github.com/OP-TEE/optee_os”h]”hŒ"https://github.com/OP-TEE/optee_os”…””}”(hjZhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j\uh1jXhjPubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K›hj?hžhubhÊ)”}”(hŒH[2] http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html”h]”(hŒ[2] ”…””}”(hjohžhhŸNh NubjY)”}”(hŒDhttp://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html”h]”hŒDhttp://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html”…””}”(hjwhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jyuh1jXhjoubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj?hžhubhÊ)”}”(hŒ![3] drivers/tee/optee/optee_smc.h”h]”hŒ![3] drivers/tee/optee/optee_smc.h”…””}”(hjŒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KŸhj?hžhubhÊ)”}”(hŒ![4] drivers/tee/optee/optee_msg.h”h]”hŒ![4] drivers/tee/optee/optee_msg.h”…””}”(hjšhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K¡hj?hžhubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ|[5] http://www.globalplatform.org/specificationsdevice.asp look for "TEE Client API Specification v1.0" and click download. ”h]”(hŒterm”“”)”}”(hŒC[5] http://www.globalplatform.org/specificationsdevice.asp look for”h]”(hŒ[5] ”…””}”(hjµhžhhŸNh NubjY)”}”(hŒ6http://www.globalplatform.org/specificationsdevice.asp”h]”hŒ6http://www.globalplatform.org/specificationsdevice.asp”…””}”(hj½hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j¿uh1jXhjµubhŒ look for”…””}”(hjµhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1j³hŸh³h K¤hj¯ubhŒ definition”“”)”}”(hhh]”hÊ)”}”(hŒ7"TEE Client API Specification v1.0" and click download.”h]”hŒ;“TEE Client API Specification v1.0†and click download.”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K¤hjØubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhj¯ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j­hŸh³h K¤hjªubah}”(h]”h ]”h"]”h$]”h&]”uh1j¨hj?hžhhŸh³h NubhÊ)”}”(hŒU[6] https://trustedfirmware-a.readthedocs.io/en/latest/threat_model/threat_model.html”h]”(hŒ[6] ”…””}”(hjûhžhhŸNh NubjY)”}”(hŒQhttps://trustedfirmware-a.readthedocs.io/en/latest/threat_model/threat_model.html”h]”hŒQhttps://trustedfirmware-a.readthedocs.io/en/latest/threat_model/threat_model.html”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”juh1jXhjûubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K¦hj?hžhubeh}”(h]”Œ references”ah ]”h"]”Œ references”ah$]”h&]”uh1h´hjÄhžhhŸh³h K™ubeh}”(h]”Œ(optee-insecure-load-image-kconfig-option”ah ]”h"]”Œ(optee_insecure_load_image kconfig option”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kfubeh}”(h]”Œ2op-tee-open-portable-trusted-execution-environment”ah ]”h"]”Œ4op-tee (open portable trusted execution environment)”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jSŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j-j*jÂj¿jÁj¾j%j"jjuŒ nametypes”}”(j-‰j‰jÁ‰j%‰j‰uh}”(j*h¶j¿jžj¾jÅj"jÄjj?uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.