minijail: Support ARM private system calls in seccomp filter policy.
This CL modifies Makefile to add ARM private system calls (__ARM_NR_*)
to the system call table in the generated libsyscalls.gen.c file, such
that the system call '__ARM_NR_<name>' can be referred by the name
'ARM_<name>' in the seccomp filter policy file.
BUG=chromium-os:32825
TEST=Tested the following:
1. FEATURES=test emerge-{x86-mario,lumpy,daisy} chromeos-minijail
2. Run `minijail0 -H` on mario, lumpy, and daisy to verify that the
expected system calls are supported (including those ARM private
system calls).
3. Run platform_CrosDisksArchive tests on x86-mario, lumpy, and daisy.
Change-Id: Ib68dc7c20eda25d87e0a7c0656c50184c319a957
Reviewed-on: https://gerrit.chromium.org/gerrit/28129
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
diff --git a/Makefile b/Makefile
index e2ba1e1..c81f876 100644
--- a/Makefile
+++ b/Makefile
@@ -60,8 +60,8 @@
# All other lines will not be emitted. The sed expression lives in its
# own macro to allow clean line wrapping.
define sed-multiline
- 's/#define \(__NR_\)\([a-z0-9_]*\)$$/#ifdef \1\2\n\
- { "\2", \1\2 },\n#endif/g p;'
+ 's/#define __\(ARM_\)\?\(NR_\)\([a-z0-9_]*\)$$/#ifdef __\1\2\3\n\
+ { "\1\3", __\1\2\3 },\n#endif/g p;'
endef
# Generates a header file with a system call table made up of "name",