Skip to content

Commit 80a7dda

Browse files
rustylynchjren1
authored andcommitted
Fix compile error caused by missing memcpy function
On some toolchain configurations direct struct assignments will default to a memcpy operation which is not present in this environment, so explicitly use the internal memcpy_s function. Signed-of-by: Rusty Lynch <rusty.lynch@intel.com>
1 parent 7a18425 commit 80a7dda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hypervisor/arch/x86/trusty.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <acrn_hv_defs.h>
3535
#include <hv_debug.h>
3636
#include <hkdf.h>
37+
#include "rtl.h"
3738

3839
_Static_assert(NR_WORLD == 2, "Only 2 Worlds supported!");
3940

@@ -294,7 +295,8 @@ static bool setup_trusty_info(struct vcpu *vcpu,
294295
/* TODO: prepare vkey_info */
295296

296297
/* copy key_info to the first page of trusty memory */
297-
mem->first_page.key_info = g_key_info;
298+
memcpy_s(&mem->first_page.key_info, sizeof(g_key_info),
299+
&g_key_info, sizeof(g_key_info));
298300

299301
memset(mem->first_page.key_info.dseed_list, 0,
300302
sizeof(mem->first_page.key_info.dseed_list));

0 commit comments

Comments
 (0)