Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
inclavare-containers
提交
84b6d820
I
inclavare-containers
项目概览
openanolis
/
inclavare-containers
通知
4
Star
7
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
5
列表
看板
标记
里程碑
合并请求
0
分析
仓库
DevOps
项目成员
Pages
I
inclavare-containers
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
5
Issue
5
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
84b6d820
编写于
8月 17, 2020
作者:
Y
YiLin.Li
提交者:
jia zhang
8月 19, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rune/libenclave/skeleton: Support OOT driver in PAL API V2
Signed-off-by:
N
Yilin Li
<
YiLin.Li@linux.alibaba.com
>
上级
1ee1ae94
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
5 deletion
+13
-5
rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton-v2.c
...lave/internal/runtime/pal/skeleton/liberpal-skeleton-v2.c
+0
-5
rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.c
...enclave/internal/runtime/pal/skeleton/liberpal-skeleton.c
+13
-0
未找到文件。
rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton-v2.c
浏览文件 @
84b6d820
...
...
@@ -13,11 +13,6 @@ int pal_get_version(void)
int
pal_init
(
pal_attr_t
*
attr
)
{
if
(
is_oot_driver
)
{
fprintf
(
stderr
,
"Skeleton PAL API v2 doesn't support SGX OOT driver!
\n
"
);
return
-
1
;
}
return
__pal_init
(
attr
);
}
...
...
rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.c
浏览文件 @
84b6d820
...
...
@@ -35,6 +35,7 @@
static
struct
sgx_secs
secs
;
static
pal_stdio_fds
pal_stdio
;
static
bool
initialized
=
false
;
static
int
exit_code
;
static
char
*
sgx_dev_path
;
static
bool
no_sgx_flc
=
false
;
static
bool
enclave_debug
=
true
;
...
...
@@ -486,6 +487,13 @@ int __pal_create_process(pal_create_process_args *args)
return
-
1
;
}
/* SGX out-of-tree driver disallows the creation of shared enclave mapping
* between parent and child process, so simply launching __pal_exec() directly here.
*/
if
(
is_oot_driver
)
{
return
__pal_exec
(
args
->
path
,
args
->
argv
,
args
->
stdio
,
&
exit_code
);
}
FILE
*
fp
=
fdopen
(
args
->
stdio
->
stderr
,
"w"
);
if
(
!
fp
)
return
-
1
;
...
...
@@ -524,6 +532,11 @@ int wait4child(pal_exec_args *attr)
return
-
1
;
}
if
(
is_oot_driver
)
{
*
attr
->
exit_value
=
exit_code
;
return
exit_code
;
}
waitpid
(
attr
->
pid
,
&
status
,
0
);
if
(
WIFEXITED
(
status
)
||
WIFSIGNALED
(
status
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录