Linux Kernel
3.7.1
|
#include <asm/bitsperlong.h>
#include <endian.h>
#include <linux/filter.h>
#include <linux/seccomp.h>
#include <linux/types.h>
#include <linux/unistd.h>
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | bpf_labels |
struct | bpf_labels::__bpf_label |
Macros | |
#define | BPF_LABELS_MAX 256 |
#define | JUMP_JT 0xff |
#define | JUMP_JF 0xff |
#define | LABEL_JT 0xfe |
#define | LABEL_JF 0xfe |
#define | ALLOW BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) |
#define | DENY BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL) |
#define | JUMP(labels, label) |
#define | LABEL(labels, label) |
#define | SYSCALL(nr, jt) |
#define | FIND_LABEL(labels, label) seccomp_bpf_label((labels), #label) |
#define | EXPAND(...) __VA_ARGS__ |
#define | LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) |
#define | ARG_32(idx) BPF_STMT(BPF_LD+BPF_W+BPF_ABS, LO_ARG(idx)) |
#define | ARG_64(idx) |
#define | JEQ32(value, jt) |
#define | JNE32(value, jt) |
#define | JEQ64(lo, hi, jt) |
#define | JNE64(lo, hi, jt) |
#define | JA32(value, jt) |
#define | JA64(lo, hi, jt) |
#define | JGE32(value, jt) |
#define | JLT32(value, jt) |
#define | JGE64(lo, hi, jt) |
#define | JLT64(lo, hi, jt) |
#define | JGT32(value, jt) |
#define | JLE32(value, jt) |
#define | JGT64(lo, hi, jt) |
#define | JLE64(lo, hi, jt) |
#define | LOAD_SYSCALL_NR |
Functions | |
int | bpf_resolve_jumps (struct bpf_labels *labels, struct sock_filter *filter, size_t count) |
__u32 | seccomp_bpf_label (struct bpf_labels *labels, const char *label) |
void | seccomp_bpf_print (struct sock_filter *filter, size_t count) |
#define ALLOW BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) |
Definition at line 44 of file bpf-helper.h.
Definition at line 138 of file bpf-helper.h.
#define ARG_64 | ( | idx | ) |
#define BPF_LABELS_MAX 256 |
Definition at line 25 of file bpf-helper.h.
#define DENY BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL) |
Definition at line 46 of file bpf-helper.h.
#define EXPAND | ( | ... | ) | __VA_ARGS__ |
Definition at line 61 of file bpf-helper.h.
#define FIND_LABEL | ( | labels, | |
label | |||
) | seccomp_bpf_label((labels), #label) |
Definition at line 59 of file bpf-helper.h.
#define JA32 | ( | value, | |
jt | |||
) |
Definition at line 177 of file bpf-helper.h.
#define JEQ32 | ( | value, | |
jt | |||
) |
Definition at line 157 of file bpf-helper.h.
#define JGE32 | ( | value, | |
jt | |||
) |
Definition at line 194 of file bpf-helper.h.
#define JGT32 | ( | value, | |
jt | |||
) |
Definition at line 221 of file bpf-helper.h.
#define JLE32 | ( | value, | |
jt | |||
) |
Definition at line 230 of file bpf-helper.h.
#define JLT32 | ( | value, | |
jt | |||
) |
Definition at line 203 of file bpf-helper.h.
#define JNE32 | ( | value, | |
jt | |||
) |
Definition at line 165 of file bpf-helper.h.
#define JUMP | ( | labels, | |
label | |||
) |
Definition at line 48 of file bpf-helper.h.
#define JUMP_JF 0xff |
Definition at line 40 of file bpf-helper.h.
#define JUMP_JT 0xff |
Definition at line 39 of file bpf-helper.h.
#define LABEL | ( | labels, | |
label | |||
) |
Definition at line 51 of file bpf-helper.h.
#define LABEL_JF 0xfe |
Definition at line 42 of file bpf-helper.h.
#define LABEL_JT 0xfe |
Definition at line 41 of file bpf-helper.h.
Definition at line 65 of file bpf-helper.h.
#define LOAD_SYSCALL_NR |
Definition at line 239 of file bpf-helper.h.
#define SYSCALL | ( | nr, | |
jt | |||
) |
int bpf_resolve_jumps | ( | struct bpf_labels * | labels, |
struct sock_filter * | filter, | ||
size_t | count | ||
) |
Definition at line 17 of file bpf-helper.c.
__u32 seccomp_bpf_label | ( | struct bpf_labels * | labels, |
const char * | label | ||
) |
Definition at line 62 of file bpf-helper.c.
void seccomp_bpf_print | ( | struct sock_filter * | filter, |
size_t | count | ||
) |
Definition at line 83 of file bpf-helper.c.