blob: 21a89a4001af2c36c0fb6dedef0fd9a255c8071f [file] [log] [blame]
From 7db27eeaba0fd5ddb1e49977bb7e342a1980aa3d Mon Sep 17 00:00:00 2001
From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Date: Sun, 12 Dec 2021 17:51:17 +0000
Subject: [PATCH 19/27] Return proper error code when rx buffer is larger
ffa_mm_communicate should return EFI_BUFFER_TOO_SMALL when
the buffer received from the secure world is larger than the
comm buffer as this value is forwarded by mm_communicate.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
---
lib/efi_loader/efi_variable_tee.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c
index b6be2b54a030..38655a9dbb7c 100644
--- a/lib/efi_loader/efi_variable_tee.c
+++ b/lib/efi_loader/efi_variable_tee.c
@@ -358,7 +358,7 @@ static efi_status_t __efi_runtime ffa_mm_communicate(void *comm_buf, ulong comm_
if (rx_data_size > comm_buf_size) {
unmap_sysmem(virt_shared_buf);
- return EFI_OUT_OF_RESOURCES;
+ return EFI_BUFFER_TOO_SMALL;
}
efi_memcpy_runtime(comm_buf, virt_shared_buf, rx_data_size);
--
2.30.2