From f3f3845b444608e982015c95ae50c8de3aad3820 Mon Sep 17 00:00:00 2001 From: Snehal Date: Fri, 19 Jul 2024 13:13:19 +0000 Subject: [PATCH] Update struct to include far and elr on the NS side Bug: 354119614 Change-Id: I88a5f08ead9a536e12bc4a3e8d701e01aa8b8f29 --- trusty/metrics/include/trusty/metrics/tipc.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/trusty/metrics/include/trusty/metrics/tipc.h b/trusty/metrics/include/trusty/metrics/tipc.h index b4428d576..4c4d37df1 100644 --- a/trusty/metrics/include/trusty/metrics/tipc.h +++ b/trusty/metrics/include/trusty/metrics/tipc.h @@ -43,6 +43,8 @@ #define UUID_STR_SIZE (37) +#define HASH_SIZE_BYTES 64 + /** * enum metrics_cmd - command identifiers for metrics interface * @METRICS_CMD_RESP_BIT: message is a response @@ -112,10 +114,22 @@ struct metrics_report_exit_req { * "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" * @crash_reason: architecture-specific code representing the reason for the * crash + * @far: Fault Address Register corresponding to the crash. It is set to 0 and + * not always revealed + * @far_hash: Fault Address Register obfuscated, always revealed + * @elr: Exception Link Register corresponding to the crash. It is set to 0 and + * not always revealed + * @elr_hash: Exception Link Register obfuscated, always revealed + * @is_hash: Boolean value indicating whether far and elr have been ob */ struct metrics_report_crash_req { char app_id[UUID_STR_SIZE]; uint32_t crash_reason; + uint64_t far; + uint8_t far_hash[HASH_SIZE_BYTES]; + uint64_t elr; + uint8_t elr_hash[HASH_SIZE_BYTES]; + bool is_hash; } __attribute__((__packed__)); enum TrustyStorageErrorType {