]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/bpf.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[mirror_ubuntu-artful-kernel.git] / include / linux / bpf.h
index 3ed1f3b1d594b67f1fab991492e5d73e10b81606..57d60dc5b60098d0f82ead2ad65b5bfa9df9019a 100644 (file)
@@ -69,14 +69,14 @@ enum bpf_arg_type {
        /* the following constraints used to prototype bpf_memcmp() and other
         * functions that access data on eBPF program stack
         */
-       ARG_PTR_TO_STACK,       /* any pointer to eBPF program stack */
-       ARG_PTR_TO_RAW_STACK,   /* any pointer to eBPF program stack, area does not
-                                * need to be initialized, helper function must fill
-                                * all bytes or clear them in error case.
+       ARG_PTR_TO_MEM,         /* pointer to valid memory (stack, packet, map value) */
+       ARG_PTR_TO_UNINIT_MEM,  /* pointer to memory does not need to be initialized,
+                                * helper function must fill all bytes or clear
+                                * them in error case.
                                 */
 
-       ARG_CONST_STACK_SIZE,   /* number of bytes accessed from stack */
-       ARG_CONST_STACK_SIZE_OR_ZERO, /* number of bytes accessed from stack or 0 */
+       ARG_CONST_SIZE,         /* number of bytes accessed from memory */
+       ARG_CONST_SIZE_OR_ZERO, /* number of bytes accessed from memory or 0 */
 
        ARG_PTR_TO_CTX,         /* pointer to context */
        ARG_ANYTHING,           /* any (initialized) argument is ok */
@@ -161,9 +161,10 @@ struct bpf_verifier_ops {
                                enum bpf_reg_type *reg_type);
        int (*gen_prologue)(struct bpf_insn *insn, bool direct_write,
                            const struct bpf_prog *prog);
-       u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg,
-                                 int src_reg, int ctx_off,
-                                 struct bpf_insn *insn, struct bpf_prog *prog);
+       u32 (*convert_ctx_access)(enum bpf_access_type type,
+                                 const struct bpf_insn *src,
+                                 struct bpf_insn *dst,
+                                 struct bpf_prog *prog);
 };
 
 struct bpf_prog_type_list {