Support for flow protected functions. More...
Macros | |
| #define | MCUX_CSSL_FP_PROTECTED_TYPE_IMPL(resultType) |
| Based on a given base type, builds a return type with flow protection. | |
| #define | MCUX_CSSL_FP_FUNCTION_DECL_IMPL(...) |
| Declaration implementation of a flow protected function. | |
| #define | MCUX_CSSL_FP_FUNCTION_DEF_IMPL(...) |
| Definition implementation of a flow protected function. | |
| #define | MCUX_CSSL_FP_FUNCTION_POINTER_IMPL(type, definition) |
| Definition implementation of a flow protected function pointer. | |
| #define | MCUX_CSSL_FP_FUNCTION_ENTRY_IMPL(...) |
| Flow protection handler implementation for the function entry point. | |
| #define | MCUX_CSSL_FP_RESULT_IMPL2(type, return) |
Extract the result value from a protected return value. | |
| #define | MCUX_CSSL_FP_RESULT_IMPL1(return) |
Extract the result value from a protected return value. | |
| #define | MCUX_CSSL_FP_RESULT_IMPL(...) |
Extract the result value from a protected return value. | |
| #define | MCUX_CSSL_FP_PROTECTION_TOKEN_IMPL(return) |
Extract the protection token value from a protected return value. | |
| #define | MCUX_CSSL_FP_FUNCTION_EXIT_IMPLn(id, result, ...) |
| Flow protection handler implementation for the function exit point. | |
| #define | MCUX_CSSL_FP_FUNCTION_EXIT_IMPL1(id) |
| Flow protection handler implementation for the function exit point. | |
| #define | MCUX_CSSL_FP_FUNCTION_EXIT_IMPL2(id, result) |
| Flow protection handler implementation for the function exit point. | |
| #define | MCUX_CSSL_FP_FUNCTION_EXIT_IMPL(...) |
| Flow protection handler implementation for the function exit point. | |
| #define | MCUX_CSSL_FP_FUNCTION_EXIT_WITH_CHECK_IMPL(id, pass, fail, ...) |
| Flow protection handler implementation for the function exit point which includes an actual check of the code flow. | |
| #define | MCUX_CSSL_FP_FUNCTION_EXIT_VOID_IMPL(...) |
Flow protection handler for the exit point of functions with the return type void. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_IMPL3(type, result, call) |
| Event implementation of a flow protected function call. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_IMPL2(result, call) |
| Event implementation of a flow protected function call. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_IMPL(...) |
| Event implementation of a flow protected function call. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_VOID_IMPL(call) |
| Event implementation of a flow protected void function call. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_PROTECTED_IMPL(result, token, call) |
| Implementation of a flow protected function call. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_VOID_PROTECTED_IMPL(token, call) |
| Implementation of a flow protected void function call. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_BEGIN_IMPL(result, token, call) |
| Implementation of a flow protected function call meant to be used from within an unprotected function, that must be terminated by MCUX_CSSL_FP_FUNCTION_CALL_END_IMPL. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_END_IMPL() |
| Implementation of the end of a section started by MCUX_CSSL_FP_FUNCTION_CALL_BEGIN_IMPL. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_VOID_BEGIN_IMPL(token, call) |
| Implementation of a flow protected void function call meant to be used from within an unprotected function, that must be terminated by MCUX_CSSL_FP_FUNCTION_CALL_VOID_END_IMPL. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALL_VOID_END_IMPL() |
| Implementation of the end of a section started by MCUX_CSSL_FP_FUNCTION_CALL_VOID_BEGIN_IMPL. | |
| #define | MCUX_CSSL_FP_FUNCTION_CALLED_IMPL(id) |
| Expectation implementation of a called function. | |
| #define | MCUX_CSSL_FP_FUNCTION_ENTERED_IMPL(id) |
| Expectation implementation of an entered (but not exited) function. | |
Support for flow protected functions.
| #define MCUX_CSSL_FP_PROTECTED_TYPE_IMPL | ( | resultType | ) |
Based on a given base type, builds a return type with flow protection.
| resultType | The type to be converted into a protected type. |
| #define MCUX_CSSL_FP_FUNCTION_DECL_IMPL | ( | ... | ) |
Declaration implementation of a flow protected function.
| id | Identifier for the function that is flow protected. |
| ptrType | Optional, pointer type matching this function. |
| #define MCUX_CSSL_FP_FUNCTION_DEF_IMPL | ( | ... | ) |
Definition implementation of a flow protected function.
| id | Identifier for the function that is flow protected. |
| ptrType | Optional, pointer type matching this function. |
| #define MCUX_CSSL_FP_FUNCTION_POINTER_IMPL | ( | type, | |
| definition ) |
Definition implementation of a flow protected function pointer.
| type | Identifier for the function pointer type that is flow protected. |
| definition | Actual type definition of the function pointer type. |
| #define MCUX_CSSL_FP_FUNCTION_ENTRY_IMPL | ( | ... | ) |
Flow protection handler implementation for the function entry point.
| id | Identifier of the function that has just been entered. |
| expect | Zero or more (comma separated) declarations of expected code flow behavior. |
| #define MCUX_CSSL_FP_RESULT_IMPL2 | ( | type, | |
| return ) |
Extract the result value from a protected return value.
| type | Type of the result. |
| return | The protected return value which contains the result. |
| #define MCUX_CSSL_FP_RESULT_IMPL1 | ( | return | ) |
Extract the result value from a protected return value.
| return | The protected return value which contains the result. |
| #define MCUX_CSSL_FP_RESULT_IMPL | ( | ... | ) |
Extract the result value from a protected return value.
| type | Optional, type of the result. |
| return | The protected return value which contains the result. |
| #define MCUX_CSSL_FP_PROTECTION_TOKEN_IMPL | ( | return | ) |
Extract the protection token value from a protected return value.
| return | The protected return value which contains the protection token. |
| #define MCUX_CSSL_FP_FUNCTION_EXIT_IMPLn | ( | id, | |
| result, | |||
| ... ) |
Flow protection handler implementation for the function exit point.
Return the result via the function return value.
| id | Identifier of the function from which we will exit. |
| result | Result that should be encoded in the return value. |
result is encoded. | #define MCUX_CSSL_FP_FUNCTION_EXIT_IMPL1 | ( | id | ) |
Flow protection handler implementation for the function exit point.
Return a null value.
| id | Identifier of the function from which we will exit. |
| #define MCUX_CSSL_FP_FUNCTION_EXIT_IMPL2 | ( | id, | |
| result ) |
Flow protection handler implementation for the function exit point.
Return the result via the function return value.
| id | Identifier of the function from which we will exit. |
| result | Result that should be encoded in the return value. |
result is encoded. | #define MCUX_CSSL_FP_FUNCTION_EXIT_IMPL | ( | ... | ) |
Flow protection handler implementation for the function exit point.
Return the result via the function return value.
Implemented as an overloaded macro to simplify the use of the API.
| id | Identifier of the function from which we will exit. |
| result | Result that should be encoded in the return value. |
| expect | Zero or more (comma separated) declarations of expected code flow behavior. |
result is encoded. | #define MCUX_CSSL_FP_FUNCTION_EXIT_WITH_CHECK_IMPL | ( | id, | |
| pass, | |||
| fail, | |||
| ... ) |
Flow protection handler implementation for the function exit point which includes an actual check of the code flow.
| id | Identifier of the function from which we will exit. |
| pass | Result that should be encoded in the return value if the flow protection check passed. |
| fail | Result that should be encoded in the return value if the flow protection check failed. |
| expect | Zero or more (comma separated) declarations of expected code flow behavior. |
pass. | #define MCUX_CSSL_FP_FUNCTION_EXIT_VOID_IMPL | ( | ... | ) |
Flow protection handler for the exit point of functions with the return type void.
| id | Identifier of the function from which we will exit. |
| expect | Zero or more (comma separated) declarations of expected code flow behavior. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_IMPL3 | ( | type, | |
| result, | |||
| call ) |
Event implementation of a flow protected function call.
| type | Type of the result variable. |
| result | Fresh variable name to store the result of call. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_IMPL2 | ( | result, | |
| call ) |
Event implementation of a flow protected function call.
| result | Fresh variable name to store the result of call. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_IMPL | ( | ... | ) |
Event implementation of a flow protected function call.
| type | Optional, type of the result variable. |
| result | Fresh variable name to store the result of call. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_VOID_IMPL | ( | call | ) |
Event implementation of a flow protected void function call.
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_PROTECTED_IMPL | ( | result, | |
| token, | |||
| call ) |
Implementation of a flow protected function call.
| result | Fresh variable name to store the result of call. |
| token | Intenionally unused, since no flow protection is provided. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_VOID_PROTECTED_IMPL | ( | token, | |
| call ) |
Implementation of a flow protected void function call.
| token | Intentionally unused, since no flow protection is provided. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_BEGIN_IMPL | ( | result, | |
| token, | |||
| call ) |
Implementation of a flow protected function call meant to be used from within an unprotected function, that must be terminated by MCUX_CSSL_FP_FUNCTION_CALL_END_IMPL.
| result | Fresh variable name to store the result of call. |
| token | Fresh variable name to store the protection token of call. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_END_IMPL | ( | ) |
Implementation of the end of a section started by MCUX_CSSL_FP_FUNCTION_CALL_BEGIN_IMPL.
| #define MCUX_CSSL_FP_FUNCTION_CALL_VOID_BEGIN_IMPL | ( | token, | |
| call ) |
Implementation of a flow protected void function call meant to be used from within an unprotected function, that must be terminated by MCUX_CSSL_FP_FUNCTION_CALL_VOID_END_IMPL.
| token | Fresh variable name to store the protection token of call. |
| call | The (protected) function call that must be performed. |
| #define MCUX_CSSL_FP_FUNCTION_CALL_VOID_END_IMPL | ( | ) |
Implementation of the end of a section started by MCUX_CSSL_FP_FUNCTION_CALL_VOID_BEGIN_IMPL.
| #define MCUX_CSSL_FP_FUNCTION_CALLED_IMPL | ( | id | ) |
Expectation implementation of a called function.
| id | Identifier of the function that is expected to be called. |
| #define MCUX_CSSL_FP_FUNCTION_ENTERED_IMPL | ( | id | ) |
Expectation implementation of an entered (but not exited) function.
| id | Identifier of the function that is expected to be entered. |