Skip to content

Commit 6849243

Browse files
committed
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 <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent f3e1821 commit 6849243

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

samples/seccomp/bpf-direct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int install_filter(void)
129129
/* Check that read is only using stdin. */
130130
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)),
131131
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),
133133

134134
/* Check that write is only using stdout */
135135
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)),
@@ -139,7 +139,7 @@ static int install_filter(void)
139139

140140
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW),
141141
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),
143143
};
144144
struct sock_fprog prog = {
145145
.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])),

samples/seccomp/bpf-helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void seccomp_bpf_print(struct sock_filter *filter, size_t count);
4444
#define ALLOW \
4545
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)
4646
#define DENY \
47-
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD)
47+
BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL)
4848
#define JUMP(labels, label) \
4949
BPF_JUMP(BPF_JMP+BPF_JA, FIND_LABEL((labels), (label)), \
5050
JUMP_JT, JUMP_JF)

0 commit comments

Comments
 (0)