You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Setting the params.setUntrustedSize(48 * 1024 * 1024) and including the malloc.h header I am presented with the error below. My CMakeLists.txt is almost also identical to the attestor.ke example which successfully manages to set the size.
My end goal is to allocate (malloc) a buffer of ~5mb inside the enclave.
Build Failure
CMakeLists.txt:
[...]
# eapp
add_executable(${eapp_bin} ${eapp_src})
target_link_libraries(${eapp_bin} ${KEYSTONE_LIB_EAPP} ${KEYSTONE_LIB_EDGE})
target_include_directories(${eapp_bin}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc
PUBLIC ${KEYSTONE_SDK_DIR}/include/app
PUBLIC ${KEYSTONE_SDK_DIR}/include/edge)
set_target_properties(${eapp_bin} PROPERTIES LINK_FLAGS "-nostdlib -static -T ${CMAKE_CURRENT_SOURCE_DIR}/eapp/app.lds")
# host
add_executable(${host_bin} ${host_src})
target_link_libraries(${host_bin} ${KEYSTONE_LIB_HOST} ${KEYSTONE_LIB_EDGE})
# add -std=c++11 flag
set_target_properties(${host_bin}
PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO
)
target_include_directories(${host_bin}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc
PUBLIC ${KEYSTONE_SDK_DIR}/include/common
PUBLIC ${KEYSTONE_SDK_DIR}/include/host
PUBLIC ${KEYSTONE_SDK_DIR}/include/edge
PUBLIC ${KEYSTONE_SDK_DIR}/include/verifier)
# add target for Eyrie runtime (see keystone.cmake)
set(eyrie_files_to_copy .options_log eyrie-rt loader.bin)
add_eyrie_runtime(${eapp_bin}-eyrie
${eyrie_plugins}
${eyrie_files_to_copy})
# add target for packaging (see keystone.cmake)
add_keystone_package(${eapp_bin}-package
${package_name}
${package_script}
${eyrie_files_to_copy} ${eapp_bin} ${host_bin})
add_dependencies(${eapp_bin}-package ${eapp_bin}-eyrie)
# add package to the top-level target
add_dependencies(examples ${eapp_bin}-package)
Additional context
Run on QEMU - end goal is to run it on the VisionFive Starfive 2
Moreover when trying to malloc a large buffer [e.g. char* pp = malloc(4913432)] inside the enclave I get
Verifying archive integrity... MD5 checksums are OK. All good.
Uncompressing Keystone Enclave Package
[runtime] page fault at 0x10c8 on 0x0 (scause: 0xd)
Do you have any idea/insight?
The text was updated successfully, but these errors were encountered:
Describe the bug
Setting the
params.setUntrustedSize(48 * 1024 * 1024)
and including themalloc.h
header I am presented with the error below. My CMakeLists.txt is almost also identical to theattestor.ke
example which successfully manages to set the size.My end goal is to allocate (malloc) a buffer of ~5mb inside the enclave.
Build Failure
CMakeLists.txt:
Screenshots or Error Log
Additional context
Run on QEMU - end goal is to run it on the VisionFive Starfive 2
Moreover when trying to
malloc
a large buffer [e.g.char* pp = malloc(4913432)
] inside the enclave I getDo you have any idea/insight?
The text was updated successfully, but these errors were encountered: