]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - kernel/bpf/syscall.c
bpf: Fix compiler warning on info.map_ids for 32bit platform
authorMartin KaFai Lau <kafai@fb.com>
Fri, 29 Sep 2017 17:52:17 +0000 (10:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 03:09:42 +0000 (04:09 +0100)
commit721e08dad17e226ef68819d0a23dc53c25fe8ea5
treec4cbe3a70e040358c9a0310f4b9a035750652952
parentb1c49d14200dae47544f7ea6ee9040ded01f8425
bpf: Fix compiler warning on info.map_ids for 32bit platform

This patch uses u64_to_user_ptr() to cast info.map_ids to a userspace ptr.
It also tags the user_map_ids with '__user' for sparse check.

Fixes: cb4d2b3f03d8 ("bpf: Add name, load_time, uid and map_ids to bpf_prog_info")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/syscall.c