Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | From 9ad9ead58e8e9e4f9e7a283c916421b443b424ce Mon Sep 17 00:00:00 2001 |
| 2 | From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com> |
| 3 | Date: Mon, 13 Dec 2021 15:25:23 +0000 |
| 4 | Subject: [PATCH 20/27] Use correct buffer size |
| 5 | |
| 6 | The comm buffer created has additional 4 bytes length which |
| 7 | needs to be trimmed. This change will reduce the size of the |
| 8 | comm buffer to what is expected. |
| 9 | |
| 10 | Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com> |
| 11 | Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> |
| 12 | --- |
| 13 | include/mm_communication.h | 4 ++-- |
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/include/mm_communication.h b/include/mm_communication.h |
| 17 | index e65fbde60d0a..bb9919095649 100644 |
| 18 | --- a/include/mm_communication.h |
| 19 | +++ b/include/mm_communication.h |
| 20 | @@ -123,7 +123,7 @@ struct __packed efi_mm_communicate_header { |
| 21 | * |
| 22 | * Defined in EDK2 as SMM_VARIABLE_COMMUNICATE_HEADER. |
| 23 | */ |
| 24 | -struct smm_variable_communicate_header { |
| 25 | +struct __packed smm_variable_communicate_header { |
| 26 | efi_uintn_t function; |
| 27 | efi_status_t ret_status; |
| 28 | u8 data[]; |
| 29 | @@ -145,7 +145,7 @@ struct smm_variable_communicate_header { |
| 30 | * Defined in EDK2 as SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE. |
| 31 | * |
| 32 | */ |
| 33 | -struct smm_variable_access { |
| 34 | +struct __packed smm_variable_access { |
| 35 | efi_guid_t guid; |
| 36 | efi_uintn_t data_size; |
| 37 | efi_uintn_t name_size; |
| 38 | -- |
| 39 | 2.30.2 |
| 40 | |