Thread (24 messages) 24 messages, 3 authors, 2020-01-08

Re: [PATCH bpf-next v3 06/11] bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2020-01-07 20:50:57
Also in: bpf

On 12/31/19 7:20 AM, Martin KaFai Lau wrote:
[...]
quoted hunk ↗ jump to hunk
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 7ab67eeae6e7..19660f168a64 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -8154,6 +8154,11 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
  		return -EINVAL;
  	}
  
+	if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS) {
+		verbose(env, "bpf_struct_ops map cannot be used in prog\n");
+		return -EINVAL;
+	}
+
Do we also need to reject map in map creation via bpf_map_meta_alloc() ?
  	return 0;
  }
  
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help