-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a workaround when
fstat()
return NOT_SUPPORT
The problem was found by a Golang + WAMR(as CGO) wrapped by EGO in a SGX Enclave. `fstat()` in EGO returns dummy values. FYI: - EGO use a `mount` configuration to define mount points that apply the host file system presented to the encalve. - EGo has a different programming model: The entire application runs inside the enclave. Manual ECALLs/OCALLs by application code are neither required nor possible. Now, it is able to specify EGO platform via the CLI: `$ cmake -S . -B build -DWAMR_BUILD_PALTFORM=ego`
- Loading branch information
Showing
5 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright (C) 2019 Intel Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
*/ | ||
|
||
#include "../linux/platform_init.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright (C) 2019 Intel Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
*/ | ||
|
||
#include "../linux/platform_internal.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (C) 2019 Intel Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
set (PLATFORM_SHARED_DIR ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
add_definitions(-DBH_PLATFORM_EGO) | ||
|
||
include_directories(${PLATFORM_SHARED_DIR}) | ||
include_directories(${PLATFORM_SHARED_DIR}/../include) | ||
|
||
include (${CMAKE_CURRENT_LIST_DIR}/../common/posix/platform_api_posix.cmake) | ||
|
||
set (PLATFORM_SHARED_SOURCE | ||
${PLATFORM_COMMON_POSIX_SOURCE} | ||
${CMAKE_CURRENT_LIST_DIR}/platform_init.c | ||
) | ||
|
||
LIST (APPEND RUNTIME_LIB_HEADER_LIST | ||
${CMAKE_CURRENT_LIST_DIR}/platform_internal.h | ||
) |