Research Article
TEE-Watchdog: Mitigating Unauthorized Activities within Trusted Execution Environments in ARM-Based Low-Power IoT Devices
Algorithm 4
Creating a log entry of access violation into log file
| Input: ⊳ Application ID causing the access violation | | Output: | | Procedure Log_Violation(ActiveApp) | | | | Initialize ⊳ A datastructure representing Log File entry is initialized with null values | | if bit 7 of MMFSR = = 1 then ⊳ The MMFAR holds a valid fault address | | ⊳ Violating application | | MMFAR ⊳ Violated peripheral address | | if bit 0 of MMFSR = = 1 then | | XN ⊳ Code execution attempt | | else if bit 1 of MMFSR = = 1 then | | RW ⊳ Read or write attempt | | else if bit 3 ofMMFSR = = 1 then | | ER ⊳ Access violation due to exception return | | else if bit 4 ofMMFSR = = 1 then | | EE ⊳ Access violation due to exception entry | | else | | UE ⊳ Unknown fault | | end | | Write to Secure Storage | | ⊳ The procedure is successful | | else | | ; | | ⊳ MMFAR does not contain a valid address and is not added to Log File | | end | | return | | End Procedure |
|