Merge "Generate both static and shared libseccomp_policy."
diff --git a/libc/SECCOMP_WHITELIST.TXT b/libc/SECCOMP_WHITELIST.TXT
index 51f7fad..a582ce4 100644
--- a/libc/SECCOMP_WHITELIST.TXT
+++ b/libc/SECCOMP_WHITELIST.TXT
@@ -94,3 +94,4 @@
# b/35906875
int inotify_init() arm
+uid_t getuid() arm
diff --git a/libc/kernel/tools/clean_header.py b/libc/kernel/tools/clean_header.py
index 99f4c7f..f474f74 100755
--- a/libc/kernel/tools/clean_header.py
+++ b/libc/kernel/tools/clean_header.py
@@ -79,55 +79,33 @@
sys.stderr.write("warning: " + msg)
-def cleanupFile(dst_dir, src_dir, rel_path, no_update = True):
+def cleanupFile(dst_file, src_file, rel_path, no_update = True):
"""reads an original header and perform the cleanup operation on it
this functions returns the destination path and the clean header
as a single string"""
- # check the header path
- full_path = os.path.join(src_dir, rel_path)
-
- if not os.path.exists(full_path):
- print_error(no_update, "file does not exist: '%s'\n" % full_path)
+ # Check the header path
+ if not os.path.exists(src_file):
+ print_error(no_update, "'%s' does not exist\n" % src_file)
return None, None
- if not os.path.isfile(full_path):
- print_error(no_update, "path is not a file: '%s'\n" % full_path)
+ if not os.path.isfile(src_file):
+ print_error(no_update, "'%s' is not a file\n" % src_file)
return None, None
- # convert into destination path, extracting architecture if needed
- # and the corresponding list of known static functions
- #
+ # Extract the architecture if found.
arch = None
statics = kernel_known_generic_statics
- m = re.match(r"asm-([\w\d_\+\.\-]+)(/.*)", rel_path)
- if m and m.group(1) != 'generic':
- dst_path = "arch-%s/asm/%s" % m.groups()
- arch = m.group(1)
- statics = statics.union(kernel_known_statics.get(arch, set()))
- else:
- # process headers under the uapi directory
- # note the "asm" level has been explicitly added in the original
- # kernel header tree for architectural-dependent uapi headers
- m_uapi = re.match(r"(uapi)/([\w\d_\+\.\-]+)(/.*)", rel_path)
- if m_uapi:
- dst_path = rel_path
- m_uapi_arch = re.match(r"asm-([\w\d_\+\.\-]+)", m_uapi.group(2))
- if m_uapi_arch and m_uapi_arch.group(1) != 'generic':
- arch = m_uapi_arch.group(1)
- statics = statics.union(kernel_known_statics.get(arch, set()))
- # common headers (ie non-asm and non-uapi)
- else:
- dst_path = os.path.join("android", rel_path)
+ m = re.search(r"(^|/)asm-([\w\d_\+\.\-]+)/.*", rel_path)
+ if m and m.group(2) != 'generic':
+ arch = m.group(2)
+ statics = statics.union(kernel_known_statics.get(arch, set()))
- dst_path = os.path.join(dst_dir, dst_path)
-
- # now, let's parse the file
- #
+ # Now, let's parse the file.
parser = cpp.BlockParser()
- blocks = parser.parseFile(full_path)
+ blocks = parser.parseFile(src_file)
if not parser.parsed:
- print_error(no_update, "can't parse '%s'%" % full_path)
- return None, None
+ print_error(no_update, "Can't parse '%s'" % src_file)
+ return None
macros = kernel_known_macros.copy()
if arch and arch in kernel_default_arch_macros:
@@ -145,7 +123,7 @@
out = StringOutput()
out.write(kernel_disclaimer)
blocks.writeWithWarning(out, kernel_warning, 4)
- return dst_path, out.get()
+ return out.get()
if __name__ == "__main__":
@@ -194,22 +172,26 @@
if no_update:
for path in args:
- dst_path, newdata = cleanupFile(dst_dir, src_dir, path)
- print newdata
+ dst_file = os.path.join(dst_dir, path)
+ src_file = os.path.join(src_dir, path)
+ new_data = cleanupFile(dst_file, src_file, path)
+ print new_data
sys.exit(0)
- # now let's update our files.
+ # Now let's update our files.
b = BatchFileUpdater()
for path in args:
- dst_path, newdata = cleanupFile(dst_dir, src_dir, path, no_update)
- if not dst_path:
+ dst_file = os.path.join(dst_dir, path)
+ src_file = os.path.join(src_dir, path)
+ new_data = cleanupFile(dst_file, src_file, path, no_update)
+ if not new_data:
continue
- b.readFile(dst_path)
- r = b.editFile(dst_path, newdata)
+ b.readFile(path)
+ r = b.editFile(path, new_data)
if r == 0:
r = "unchanged"
elif r == 1:
@@ -217,7 +199,7 @@
else:
r = "added"
- print "cleaning: %-*s -> %-*s (%s)" % (35, path, 35, dst_path, r)
+ print "cleaning: %-*s -> %-*s (%s)" % (35, path, 35, path, r)
b.updateGitFiles()
diff --git a/libc/kernel/tools/update_all.py b/libc/kernel/tools/update_all.py
index 5031168..e5a07f8 100755
--- a/libc/kernel/tools/update_all.py
+++ b/libc/kernel/tools/update_all.py
@@ -24,105 +24,77 @@
""" % { "progname" : os.path.basename(sys.argv[0]) }
sys.exit(0)
+def processFiles(updater, original_dir, modified_dir, src_rel_dir, update_rel_dir):
+ # Delete the old headers before updating to the new headers.
+ update_dir = os.path.join(get_kernel_dir(), update_rel_dir)
+ shutil.rmtree(update_dir)
+ os.mkdir(update_dir, 0755)
+
+ src_dir = os.path.normpath(os.path.join(original_dir, src_rel_dir))
+ src_dir_len = len(src_dir) + 1
+ mod_src_dir = os.path.join(modified_dir, src_rel_dir)
+ update_dir = os.path.join(get_kernel_dir(), update_rel_dir)
+
+ kernel_dir = get_kernel_dir()
+ for root, _, files in os.walk(src_dir):
+ for file in sorted(files):
+ _, ext = os.path.splitext(file)
+ if ext != ".h":
+ continue
+ src_file = os.path.normpath(os.path.join(root, file))
+ rel_path = src_file[src_dir_len:]
+ # Check to see if there is a modified header to use instead.
+ if os.path.exists(os.path.join(mod_src_dir, rel_path)):
+ src_file = os.path.join(mod_src_dir, rel_path)
+ src_str = os.path.join("<modified>", src_rel_dir, rel_path)
+ else:
+ src_str = os.path.join("<original>", src_rel_dir, rel_path)
+ dst_file = os.path.join(update_dir, rel_path)
+ new_data = clean_header.cleanupFile(dst_file, src_file, rel_path)
+ if not new_data:
+ continue
+ updater.readFile(dst_file)
+ ret_val = updater.editFile(dst_file, new_data)
+ if ret_val == 0:
+ state = "unchanged"
+ elif ret_val == 1:
+ state = "edited"
+ else:
+ state = "added"
+ update_path = os.path.join(update_rel_dir, rel_path)
+ print "cleaning %s -> %s (%s)" % (src_str, update_path, state)
+
try:
optlist, args = getopt.getopt(sys.argv[1:], '')
except:
- # unrecognized option
+ # Unrecognized option
sys.stderr.write("error: unrecognized option\n")
usage()
if len(optlist) > 0 or len(args) > 2:
usage()
-modified_dir = get_kernel_headers_modified_dir()
-if len(args) == 1 or len(args) == 2:
+if len(args) > 0:
original_dir = args[0]
- if not os.path.isdir(original_dir):
- panic("Not a directory: %s\n" % original_dir)
-
- if len(args) == 2:
- modified_dir = args[1]
- if not os.path.isdir(modified_dir):
- panic("Not a directory: %s\n" % modified_dir)
else:
original_dir = get_kernel_headers_original_dir()
- if not os.path.isdir(original_dir):
- panic("Missing directory, please specify one through command-line: %s\n" % original_dir)
+
+if len(args) > 1:
+ modified_dir = args[1]
+else:
+ modified_dir = get_kernel_headers_modified_dir()
+
+if not os.path.isdir(original_dir):
+ panic("The kernel directory %s is not a directory\n" % original_dir)
if not os.path.isdir(modified_dir):
- modified_dir = None
+ panic("The kernel modified directory %s is not a directory\n" % modified_dir)
-# Find all source files in 'original'.
-sources = dict()
-original_dir = os.path.normpath(original_dir)
-original_dir_len = len(original_dir) + 1
-for root, _, files in os.walk(original_dir):
- for file in files:
- _, ext = os.path.splitext(file)
- if ext == ".h":
- rel_path = os.path.normpath(os.path.join(root, file))
- rel_path = rel_path[original_dir_len:]
- # Check to see if there is a modified header to use instead.
- if modified_dir and os.path.exists(os.path.join(modified_dir, rel_path)):
- sources[rel_path] = False
- else:
- sources[rel_path] = True
+updater = BatchFileUpdater()
+# Process the original uapi headers first.
+processFiles(updater, original_dir, modified_dir, "uapi", "uapi"),
+# Now process the special files.
+processFiles(updater, original_dir, modified_dir, "scsi", os.path.join("android", "scsi"))
-b = BatchFileUpdater()
-
-kernel_dir = get_kernel_dir()
-for arch in kernel_archs:
- b.readDir(os.path.join(kernel_dir, "arch-%s" % arch))
-
-b.readDir(os.path.join(kernel_dir, "android"))
-
-# Delete the old uapi headers before updating to handle headers that
-# get moved/deleted.
-uapi_dir = os.path.join(get_kernel_dir(), "uapi")
-shutil.rmtree(uapi_dir)
-os.mkdir(uapi_dir, 0755)
-
-oldlen = 120
-android_root_len = len(get_android_root()) + 1
-for rel_path in sorted(sources):
- if sources[rel_path]:
- src_dir = original_dir
- src_str = "<original>/"
- else:
- src_dir = modified_dir
- src_str = "<modified>/"
- dst_path, newdata = clean_header.cleanupFile(kernel_dir, src_dir, rel_path)
- if not dst_path:
- continue
-
- dst_path = os.path.join(kernel_dir, dst_path)
- b.readFile(dst_path)
- r = b.editFile(dst_path, newdata)
- if r == 0:
- state = "unchanged"
- elif r == 1:
- state = "edited"
- else:
- state = "added"
-
- # dst_path is guaranteed to include android root.
- rel_dst_path = dst_path[android_root_len:]
- str = "cleaning: %-*s -> %-*s (%s)" % (35, src_str + rel_path, 35, rel_dst_path, state)
- if sys.stdout.isatty():
- print "%-*s" % (oldlen, str),
- if (r == 0):
- print "\r",
- else:
- print "\n",
- oldlen = 0
- else:
- print str
-
- oldlen = len(str)
-
-print "%-*s" % (oldlen, "Done!")
-
-b.updateGitFiles()
-
-sys.exit(0)
+updater.updateGitFiles()
diff --git a/libc/kernel/tools/utils.py b/libc/kernel/tools/utils.py
index e2cc9ce..1b06b1b 100644
--- a/libc/kernel/tools/utils.py
+++ b/libc/kernel/tools/utils.py
@@ -31,8 +31,14 @@
def get_android_root():
if "ANDROID_BUILD_TOP" in os.environ:
+ # Verify that the current directory is in the root.
+ # If not, then print an error.
+ cwd = os.getcwd()
+ root = os.environ["ANDROID_BUILD_TOP"]
+ if len(cwd) < len(root) or not root == cwd[:len(root)]:
+ panic("Not in android tree pointed at by ANDROID_BUILD_TOP (%s)\n" % root)
return os.environ["ANDROID_BUILD_TOP"]
- panic("Unable to find root of tree, did you forget to lunch a target?")
+ panic("Unable to find root of tree, did you forget to lunch a target?\n")
class StringOutput:
diff --git a/libc/seccomp/arm_policy.cpp b/libc/seccomp/arm_policy.cpp
index c9cd629..278c866 100644
--- a/libc/seccomp/arm_policy.cpp
+++ b/libc/seccomp/arm_policy.cpp
@@ -5,130 +5,132 @@
#include "seccomp_bpfs.h"
const sock_filter arm_filter[] = {
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 125),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 168, 63, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 77, 31, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 45, 15, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 26, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 127),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 63, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 74, 31, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 41, 15, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 7, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 10, 3, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 8, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 7, 119, 118), //restart_syscall|exit|fork|read|write|open|close
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 9, 118, 117), //creat
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 7, 121, 120), //restart_syscall|exit|fork|read|write|open|close
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 9, 120, 119), //creat
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 19, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 13, 116, 115), //unlink|execve|chdir
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 22, 115, 114), //lseek|getpid|mount
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 36, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 27, 112, 111), //ptrace
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 13, 118, 117), //unlink|execve|chdir
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 22, 117, 116), //lseek|getpid|mount
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 26, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 25, 114, 113), //getuid
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 27, 113, 112), //ptrace
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 36, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 34, 111, 110), //access
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 41, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 38, 109, 108), //sync|kill
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 108, 107), //dup|pipe|times
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 60, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 54, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 51, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 46, 104, 103), //brk
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 38, 110, 109), //sync|kill
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 51, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 45, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 106, 105), //dup|pipe|times
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 46, 105, 104), //brk
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 54, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 53, 103, 102), //acct|umount2
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 56, 101, 100), //ioctl|fcntl
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 100, 99), //setpgid
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 66, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 64, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 62, 97, 96), //umask|chroot
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 56, 102, 101), //ioctl|fcntl
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 64, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 60, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 99, 98), //setpgid
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 62, 98, 97), //umask|chroot
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 66, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 65, 96, 95), //getppid
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 74, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 68, 94, 93), //setsid|sigaction
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 76, 93, 92), //sethostname|setrlimit
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 15, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 87, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 85, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 80, 88, 87), //getrusage|gettimeofday|settimeofday
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 68, 95, 94), //setsid|sigaction
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 15, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 85, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 77, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 76, 90, 89), //sethostname|setrlimit
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 80, 89, 88), //getrusage|gettimeofday|settimeofday
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 87, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 86, 87, 86), //readlink
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 89, 85, 84), //swapon|reboot
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 84, 83), //munmap|truncate
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 103, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 96, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 81, 80), //fchmod
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 89, 86, 85), //swapon|reboot
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 96, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 83, 82), //munmap|truncate
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 82, 81), //fchmod
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 103, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 98, 80, 79), //getpriority|setpriority
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 106, 78, 77), //syslog|setitimer|getitimer
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 77, 76), //wait4|swapoff|sysinfo
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 128, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 124, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 123, 73, 72), //fsync|sigreturn|clone|setdomainname|uname
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 106, 79, 78), //syslog|setitimer|getitimer
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 131, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 124, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 75, 74), //wait4|swapoff|sysinfo
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 123, 74, 73), //fsync|sigreturn|clone|setdomainname|uname
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 128, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 126, 72, 71), //adjtimex|mprotect
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 131, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 130, 70, 69), //init_module|delete_module
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 134, 69, 68), //quotactl|getpgid|fchdir
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 143, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 138, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 66, 65), //personality
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 130, 71, 70), //init_module|delete_module
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 138, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 134, 68, 67), //quotactl|getpgid|fchdir
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 67, 66), //personality
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 143, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 142, 65, 64), //setfsuid|setfsgid|_llseek|getdents
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 63, 62), //flock|msync|readv|writev|getsid|fdatasync
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 164, 62, 61), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 290, 31, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 219, 15, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 199, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 183, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 56, 55), //poll
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 64, 63), //flock|msync|readv|writev|getsid|fdatasync
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 286, 31, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 15, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 190, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 168, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 164, 58, 57), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 57, 56), //poll
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 183, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 182, 55, 54), //prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 190, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 188, 53, 52), //getcwd|capget|capset|sigaltstack|sendfile
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 52, 51), //vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 213, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 212, 49, 48), //getuid32|getgid32|geteuid32|getegid32|setreuid32|setregid32|getgroups32|setgroups32|fchown32|setresuid32|getresuid32|setresgid32|getresgid32
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 215, 48, 47), //setuid32|setgid32
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 188, 54, 53), //getcwd|capget|capset|sigaltstack|sendfile
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 213, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 199, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 51, 50), //vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 212, 50, 49), //getuid32|getgid32|geteuid32|getegid32|setreuid32|setregid32|getgroups32|setgroups32|fchown32|setresuid32|getresuid32|setresgid32|getresgid32
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 46, 45), //getdents64
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 45, 44), //getdents64
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 248, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 222, 41, 40), //mincore|madvise|fcntl64
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 215, 48, 47), //setuid32|setgid32
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 47, 46), //getdents64
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 250, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 219, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 43, 42), //getdents64
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 222, 42, 41), //mincore|madvise|fcntl64
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 248, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 243, 40, 39), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 250, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 249, 38, 37), //exit_group
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 37, 36), //epoll_create|epoll_ctl|epoll_wait
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 270, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 269, 34, 33), //set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 249, 39, 38), //exit_group
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 270, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 36, 35), //epoll_create|epoll_ctl|epoll_wait
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 269, 35, 34), //set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 271, 33, 32), //arm_fadvise64_64
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 286, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 31, 30), //waitid|socket|bind|connect|listen
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 289, 30, 29), //getsockname|getpeername|socketpair
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 350, 15, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 327, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 316, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 292, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 291, 25, 24), //sendto
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 32, 31), //waitid|socket|bind|connect|listen
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 348, 15, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 292, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 290, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 289, 27, 26), //getsockname|getpeername|socketpair
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 291, 26, 25), //sendto
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 316, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 298, 24, 23), //recvfrom|shutdown|setsockopt|getsockopt|sendmsg|recvmsg
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 319, 22, 21), //inotify_init|inotify_add_watch|inotify_rm_watch
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 326, 21, 20), //openat|mkdirat|mknodat|fchownat
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 345, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 340, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 338, 18, 17), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 319, 23, 22), //inotify_init|inotify_add_watch|inotify_rm_watch
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 340, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 327, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 326, 20, 19), //openat|mkdirat|mknodat|fchownat
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 338, 19, 18), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 345, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 344, 17, 16), //splice|sync_file_range2|tee|vmsplice
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 348, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 347, 15, 14), //getcpu|epoll_pwait
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 349, 14, 13), //utimensat
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 383, 7, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 372, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 369, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 367, 10, 9), //timerfd_create|eventfd|fallocate|timerfd_settime|timerfd_gettime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg|accept4
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 347, 16, 15), //getcpu|epoll_pwait
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 374, 7, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 369, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 350, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 349, 12, 11), //utimensat
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 367, 11, 10), //timerfd_create|eventfd|fallocate|timerfd_settime|timerfd_gettime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg|accept4
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 372, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 370, 9, 8), //prlimit64
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 374, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 373, 7, 6), //clock_adjtime
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 378, 6, 5), //sendmmsg|setns|process_vm_readv|process_vm_writev
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983045, 3, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983042, 1, 0),
-BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 385, 3, 2), //seccomp|getrandom
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 373, 8, 7), //clock_adjtime
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983042, 3, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 383, 1, 0),
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 378, 5, 4), //sendmmsg|setns|process_vm_readv|process_vm_writev
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 385, 4, 3), //seccomp|getrandom
+BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983045, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983043, 2, 1), //__ARM_NR_cacheflush
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983046, 1, 0), //__ARM_NR_set_tls
BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),