OSDN Git Service

bpf: Move owner type, jited info into array auxiliary data
[tomoyo/tomoyo-test1.git] / include / linux / bpf.h
index 561b920..c3b2906 100644 (file)
@@ -560,17 +560,21 @@ struct bpf_prog_aux {
        };
 };
 
+struct bpf_array_aux {
+       /* 'Ownership' of prog array is claimed by the first program that
+        * is going to use this map or by the first program which FD is
+        * stored in the map to make sure that all callers and callees have
+        * the same prog type and JITed flag.
+        */
+       enum bpf_prog_type type;
+       bool jited;
+};
+
 struct bpf_array {
        struct bpf_map map;
        u32 elem_size;
        u32 index_mask;
-       /* 'ownership' of prog_array is claimed by the first program that
-        * is going to use this map or by the first program which FD is stored
-        * in the map to make sure that all callers and callees have the same
-        * prog_type and JITed flag
-        */
-       enum bpf_prog_type owner_prog_type;
-       bool owner_jited;
+       struct bpf_array_aux *aux;
        union {
                char value[0] __aligned(8);
                void *ptrs[0] __aligned(8);