|
Zbigniew Jędrzejewski-Szmek |
d044ab |
From 5a3e65fa2537b31334ccb8b73a28208a3b535076 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
Date: Sat, 15 Jul 2017 19:30:48 +0000
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
Subject: [PATCH] test-seccomp: arm64 does not have access() and poll()
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
glibc uses faccessat and ppoll, so just add a filters for that.
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
(cherry picked from commit abc0213839fef92e2e2b98a434914f22ece48490)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
(cherry picked from commit f60a865a496e1e6fde7436b4013dd8ff677f29a1)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
src/test/test-seccomp.c | 8 ++++++++
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
1 file changed, 8 insertions(+)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
index 50fe24c794..28fe206507 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
--- a/src/test/test-seccomp.c
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+++ b/src/test/test-seccomp.c
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
@@ -529,7 +529,11 @@ static void test_load_syscall_filter_set_raw(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(poll(NULL, 0, 0) == 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(s = set_new(NULL));
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+#if SCMP_SYS(access) >= 0
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(set_put(s, UINT32_TO_PTR(__NR_access + 1)) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+#else
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+ assert_se(set_put(s, UINT32_TO_PTR(__NR_faccessat + 1)) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+#endif
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(seccomp_load_syscall_filter_set_raw(SCMP_ACT_ALLOW, s, SCMP_ACT_ERRNO(EUCLEAN)) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
@@ -541,7 +545,11 @@ static void test_load_syscall_filter_set_raw(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
s = set_free(s);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(s = set_new(NULL));
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+#if SCMP_SYS(poll) >= 0
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(set_put(s, UINT32_TO_PTR(__NR_poll + 1)) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+#else
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+ assert_se(set_put(s, UINT32_TO_PTR(__NR_ppoll + 1)) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+#endif
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
assert_se(seccomp_load_syscall_filter_set_raw(SCMP_ACT_ALLOW, s, SCMP_ACT_ERRNO(EUNATCH)) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|