Revert "Move seccomp policy to bionic"
This reverts commit 06a32206c5430321dd3fc02b70acbf99383786c1.
Reverting build-breaking change
Change-Id: Ib3698bca8f905033a9c7f22bc2fa9f7e7bf75873
diff --git a/libc/tools/genseccomp.py b/libc/tools/genseccomp.py
index 3796683..7d2b1da 100755
--- a/libc/tools/genseccomp.py
+++ b/libc/tools/genseccomp.py
@@ -149,8 +149,8 @@
#include <linux/filter.h>
#include <errno.h>
- #include "seccomp_bpfs.h"
- const sock_filter {architecture}_filter[] = {{
+ #include "seccomp_policy.h"
+ const struct sock_filter {architecture}_filter[] = {{
""").format(architecture=architecture)
footer = textwrap.dedent("""\
@@ -196,7 +196,7 @@
# And output policy
existing = ""
- output_path = "seccomp/{}_policy.cpp".format(arch)
+ output_path = "seccomp/{}_policy.c".format(arch)
if os.path.isfile(output_path):
existing = open(output_path).read()
if output == existing:
diff --git a/libc/tools/test_genseccomp.py b/libc/tools/test_genseccomp.py
index 5b2f14f..de1e5fe 100755
--- a/libc/tools/test_genseccomp.py
+++ b/libc/tools/test_genseccomp.py
@@ -107,8 +107,8 @@
#include <linux/filter.h>
#include <errno.h>
- #include "seccomp_bpfs.h"
- const sock_filter arm_filter[] = {
+ #include "seccomp_policy.h"
+ const struct sock_filter arm_filter[] = {
line1
line2
};
@@ -136,8 +136,8 @@
#include <linux/filter.h>
#include <errno.h>
- #include "seccomp_bpfs.h"
- const sock_filter arm_filter[] = {
+ #include "seccomp_policy.h"
+ const struct sock_filter arm_filter[] = {
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 3, 0, 3),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 140, 1, 0),
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4, 2, 1), //read