diff options
author | Kees Cook <keescook@chromium.org> | 2017-08-16 23:26:57 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-08-16 23:26:57 -0400 |
commit | 6849243bf4c6155151b294e9f0e0dc9540d6f083 (patch) | |
tree | 9024604fcfae080aa234c0ad4cf92caeb797d0e1 | |
parent | f3e1821d9e1cc3fb434d7763001791dcd6720c90 (diff) |
samples: Unrename SECCOMP_RET_KILL
Since samples can still be built before header installs, avoid the
cosmetic renaming of SECCOMP_RET_KILL to avoid build failures in -next.
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | samples/seccomp/bpf-direct.c | 4 | ||||
-rw-r--r-- | samples/seccomp/bpf-helper.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/samples/seccomp/bpf-direct.c b/samples/seccomp/bpf-direct.c index 235ce3c49ee9..151ec3f52189 100644 --- a/samples/seccomp/bpf-direct.c +++ b/samples/seccomp/bpf-direct.c | |||
@@ -129,7 +129,7 @@ static int install_filter(void) | |||
129 | /* Check that read is only using stdin. */ | 129 | /* Check that read is only using stdin. */ |
130 | BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)), | 130 | BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)), |
131 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, STDIN_FILENO, 4, 0), | 131 | BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, STDIN_FILENO, 4, 0), |
132 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD), | 132 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL), |
133 | 133 | ||
134 | /* Check that write is only using stdout */ | 134 | /* Check that write is only using stdout */ |
135 | BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)), | 135 | BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)), |
@@ -139,7 +139,7 @@ static int install_filter(void) | |||
139 | 139 | ||
140 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), | 140 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), |
141 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_TRAP), | 141 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_TRAP), |
142 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD), | 142 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL), |
143 | }; | 143 | }; |
144 | struct sock_fprog prog = { | 144 | struct sock_fprog prog = { |
145 | .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])), | 145 | .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])), |
diff --git a/samples/seccomp/bpf-helper.h b/samples/seccomp/bpf-helper.h index 83dbe79cbe2c..1d8de9edd858 100644 --- a/samples/seccomp/bpf-helper.h +++ b/samples/seccomp/bpf-helper.h | |||
@@ -44,7 +44,7 @@ void seccomp_bpf_print(struct sock_filter *filter, size_t count); | |||
44 | #define ALLOW \ | 44 | #define ALLOW \ |
45 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) | 45 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) |
46 | #define DENY \ | 46 | #define DENY \ |
47 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD) | 47 | BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL) |
48 | #define JUMP(labels, label) \ | 48 | #define JUMP(labels, label) \ |
49 | BPF_JUMP(BPF_JMP+BPF_JA, FIND_LABEL((labels), (label)), \ | 49 | BPF_JUMP(BPF_JMP+BPF_JA, FIND_LABEL((labels), (label)), \ |
50 | JUMP_JT, JUMP_JF) | 50 | JUMP_JT, JUMP_JF) |