From bbc4bc54f2c268eebe4d11683955ca199a65d9eb Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Fri, 8 Sep 2023 13:47:18 -0700 Subject: [PATCH] keymaster: Remove usage of PAGE_SIZE bionic provides PAGE_SIZE macro which happens to also match the size keymaster send buffer (4096) and half the size of the recv buffer. PAGE_SIZE is being removed as no other libc provides this and Android is moving towards being page-size-agnostic. Use a 4096 constant instead. Test: Boot 16k device Bug: 294914413 Change-Id: I2dc10b48811e24d25ba08cfe4ffb514e94d42a8f Signed-off-by: Kalesh Singh --- .../include/trusty_keymaster/ipc/trusty_keymaster_ipc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trusty/keymaster/include/trusty_keymaster/ipc/trusty_keymaster_ipc.h b/trusty/keymaster/include/trusty_keymaster/ipc/trusty_keymaster_ipc.h index 16207e6d9..efad254c8 100644 --- a/trusty/keymaster/include/trusty_keymaster/ipc/trusty_keymaster_ipc.h +++ b/trusty/keymaster/include/trusty_keymaster/ipc/trusty_keymaster_ipc.h @@ -22,9 +22,9 @@ __BEGIN_DECLS -const uint32_t TRUSTY_KEYMASTER_RECV_BUF_SIZE = 2 * PAGE_SIZE; +const uint32_t TRUSTY_KEYMASTER_RECV_BUF_SIZE = 2 * 4096; const uint32_t TRUSTY_KEYMASTER_SEND_BUF_SIZE = - (PAGE_SIZE - sizeof(struct keymaster_message) - 16 /* tipc header */); + (4096 - sizeof(struct keymaster_message) - 16 /* tipc header */); int trusty_keymaster_connect(void); int trusty_keymaster_call(uint32_t cmd, void* in, uint32_t in_size, uint8_t* out,