Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
c2c87fed
Unverified
Commit
c2c87fed
authored
Dec 17, 2019
by
dongxinhua
Committed by
Christian Brauner
Dec 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seccomp: support s390 seccomp
Signed-off-by:
dongxinhua
<
dongxinhua@huawei.com
>
parent
5d562424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
seccomp.c
src/lxc/seccomp.c
+19
-1
No files found.
src/lxc/seccomp.c
View file @
c2c87fed
...
...
@@ -288,6 +288,7 @@ enum lxc_hostarch_t {
lxc_seccomp_arch_mipsel64
,
lxc_seccomp_arch_mipsel64n32
,
lxc_seccomp_arch_s390x
,
lxc_seccomp_arch_s390
,
lxc_seccomp_arch_unknown
=
999
,
};
...
...
@@ -320,7 +321,8 @@ int get_hostarch(void)
return
MIPS_ARCH_O32
;
else
if
(
strncmp
(
uts
.
machine
,
"s390x"
,
5
)
==
0
)
return
lxc_seccomp_arch_s390x
;
else
if
(
strncmp
(
uts
.
machine
,
"s390"
,
4
)
==
0
)
return
lxc_seccomp_arch_s390
;
return
lxc_seccomp_arch_unknown
;
}
...
...
@@ -389,6 +391,11 @@ scmp_filter_ctx get_new_ctx(enum lxc_hostarch_t n_arch,
arch
=
SCMP_ARCH_S390X
;
break
;
#endif
#ifdef SCMP_ARCH_S390
case
lxc_seccomp_arch_s390
:
arch
=
SCMP_ARCH_S390
;
break
;
#endif
default:
return
NULL
;
}
...
...
@@ -888,6 +895,17 @@ static int parse_config_v2(FILE *f, char *line, size_t *line_bufsz, struct lxc_c
cur_rule_arch
=
lxc_seccomp_arch_s390x
;
}
#endif
#ifdef SCMP_ARCH_S390
else
if
(
strcmp
(
line
,
"[s390]"
)
==
0
||
strcmp
(
line
,
"[S390]"
)
==
0
)
{
if
(
native_arch
!=
lxc_seccomp_arch_s390
)
{
cur_rule_arch
=
lxc_seccomp_arch_unknown
;
continue
;
}
cur_rule_arch
=
lxc_seccomp_arch_s390
;
}
#endif
else
{
goto
bad_arch
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment