diff options
author | David S. Miller <davem@davemloft.net> | 2019-11-25 15:46:58 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-25 15:46:58 -0800 |
commit | 622dc5ad8052f4f0c6b7a12787696a5caa3c6a58 (patch) | |
tree | d869a2aefe3deed534a4bfc35073e93e6d0e2047 | |
parent | adf6f8cb3f4c2a15d5f35e6cf9ffeb6856d35312 (diff) | |
parent | b615e5a1e067dcb327482d1af7463268b89b1629 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says:
====================
pull-request: bpf-next 2019-11-26
The following pull-request contains BPF updates for your *net-next* tree.
We've added 2 non-merge commits during the last 1 day(s) which contain
a total of 2 files changed, 14 insertions(+), 3 deletions(-).
The main changes, 2 small fixes are:
1) Fix libbpf out of tree compilation which complained about unknown u32
type used in libbpf_find_vmlinux_btf_id() which needs to be __u32 instead,
from Andrii Nakryiko.
2) Follow-up fix for the prior BPF mmap series where kbuild bot complained
about missing vmalloc_user_node_flags() for no-MMU, also from Andrii Nakryiko.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | mm/nommu.c | 15 | ||||
-rw-r--r-- | tools/lib/bpf/libbpf.c | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 99b7ec318824..7de592058ab4 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -155,11 +155,11 @@ void *__vmalloc_node_flags(unsigned long size, int node, gfp_t flags) return __vmalloc(size, flags, PAGE_KERNEL); } -void *vmalloc_user(unsigned long size) +static void *__vmalloc_user_flags(unsigned long size, gfp_t flags) { void *ret; - ret = __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); + ret = __vmalloc(size, flags, PAGE_KERNEL); if (ret) { struct vm_area_struct *vma; @@ -172,8 +172,19 @@ void *vmalloc_user(unsigned long size) return ret; } + +void *vmalloc_user(unsigned long size) +{ + return __vmalloc_user_flags(size, GFP_KERNEL | __GFP_ZERO); +} EXPORT_SYMBOL(vmalloc_user); +void *vmalloc_user_node_flags(unsigned long size, int node, gfp_t flags) +{ + return __vmalloc_user_flags(size, flags | __GFP_ZERO); +} +EXPORT_SYMBOL(vmalloc_user_node_flags); + struct page *vmalloc_to_page(const void *addr) { return virt_to_page(addr); diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index e1698461c6b3..b20f82e58989 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -5128,7 +5128,7 @@ int libbpf_find_vmlinux_btf_id(const char *name, char *dst = raw_tp_btf + sizeof(BTF_PREFIX) - 1; const char *btf_name; int err = -EINVAL; - u32 kind; + __u32 kind; if (IS_ERR(btf)) { pr_warn("vmlinux BTF is not found\n"); |