From b0ed84ca8d4abc88984881049d572f558aaf1838 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Mon, 22 Apr 2013 16:04:23 -0400 Subject: bpf: fix the bpf_program struct In a previous commit I reordered the bpf_program struct, and in the process I broke the prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ...) API. This patch restores the proper bpf_program structure ordering. Signed-off-by: Paul Moore --- src/gen_bpf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gen_bpf.h b/src/gen_bpf.h index 954ce7f..fe0580e 100644 --- a/src/gen_bpf.h +++ b/src/gen_bpf.h @@ -28,9 +28,10 @@ #include "db.h" #include "system.h" +/* NOTE - do not change this structure, it is part of the prctl() API */ struct bpf_program { - bpf_instr_raw *blks; uint16_t blk_cnt; + bpf_instr_raw *blks; }; #define BPF_PGM_SIZE(x) \ ((x)->blk_cnt * sizeof(*((x)->blks))) -- cgit v1.2.1