Skip to content

Commit af9b29e

Browse files
davidkyleHendrik Muhs
authored and
Hendrik Muhs
committed
[ML] Add comment explaining changes required if Linux BPF are modified.
1 parent 1a4d577 commit af9b29e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/seccomp/CSystemCallFilter_Linux.cc

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const struct sock_filter FILTER[] = {
5252
BPF_STMT(BPF_LD | BPF_W | BPF_ABS, SECCOMP_DATA_NR_OFFSET),
5353
// Only applies to X86_64 arch. Jump to disallow for calls using the x32 ABI
5454
BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, UPPER_NR_LIMIT, 34, 0),
55+
// If any sys call filters are added or removed then the jump
56+
// destination for each statement including the one above must
57+
// be updated accordingly
58+
5559
// Allowed sys calls, jump to return allow on match
5660
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_read, 34, 0),
5761
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_write, 33, 0),

0 commit comments

Comments
 (0)