aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/syscall.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2016-03-24 19:30:25 -0400
committerDavid S. Miller <davem@davemloft.net>2016-03-25 11:36:41 -0400
commit322cea2f41adb62c975f46a3242f4e3b43226fa1 (patch)
tree706f3bcffd78159e7cf735074ed7aacb0dfde437 /kernel/bpf/syscall.c
parent543e3a8da5a4c453e992d5351ef405d5e32f27d7 (diff)
bpf: add missing map_flags to bpf_map_show_fdinfo
Add map_flags attribute to bpf_map_show_fdinfo(), so that tools like tc can check for them when loading objects from a pinned entry, e.g. if user intent wrt allocation (BPF_F_NO_PREALLOC) is different to the pinned object, it can bail out. Follow-up to 6c9059817432 ("bpf: pre-allocate hash map elements"), so that tc can still support this with v4.6. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r--kernel/bpf/syscall.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 2a2efe1bc76c..adc5e4bd74f8 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -137,11 +137,13 @@ static void bpf_map_show_fdinfo(struct seq_file *m, struct file *filp)
137 "map_type:\t%u\n" 137 "map_type:\t%u\n"
138 "key_size:\t%u\n" 138 "key_size:\t%u\n"
139 "value_size:\t%u\n" 139 "value_size:\t%u\n"
140 "max_entries:\t%u\n", 140 "max_entries:\t%u\n"
141 "map_flags:\t%#x\n",
141 map->map_type, 142 map->map_type,
142 map->key_size, 143 map->key_size,
143 map->value_size, 144 map->value_size,
144 map->max_entries); 145 map->max_entries,
146 map->map_flags);
145} 147}
146#endif 148#endif
147 149