From: Rong Chen <rong.a.chen@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 11808/13503] kernel/bpf/syscall.c:154: undefined reference to `vmalloc_user_node_flags'
Date: Mon, 25 Nov 2019 15:42:38 +0800 [thread overview]
Message-ID: <1a9bdba3-ccbf-95d0-6033-467fa0f7eddd@intel.com> (raw)
In-Reply-To: <baf09eb1-946b-fe04-6302-006654d594e0@fb.com>
[-- Attachment #1: Type: text/plain, Size: 6275 bytes --]
On 11/24/19 1:37 AM, Andrii Nakryiko wrote:
> On 11/23/19 3:44 AM, kbuild test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head: b9d3d01405061bb42358fe53f824e894a1922ced
>> commit: fc9702273e2edb90400a34b3be76f7b08fa3344b [11808/13503] bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY
>> config: arm-randconfig-a001-20191123 (attached as .config)
>> compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
>> reproduce:
>> wget https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.githubusercontent.com_intel_lkp-2Dtests_master_sbin_make.cross&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=vxqvl81C2rT6GOGdPyz8iQ&m=OyqPkKr2ayhE9rsjQ3V9TjPHNWGAzMj67odoKch8_YM&s=JuUtGb4L_bH6ANKEMAgVL3zSBnFkOW4jhVP9W3WBHBM&e= -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> git checkout fc9702273e2edb90400a34b3be76f7b08fa3344b
>> # save the attached .config to linux build tree
>> GCC_VERSION=7.4.0 make.cross ARCH=arm
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>> arm-linux-gnueabi-ld: section .data VMA [0000000000808000,00000000008829bf] overlaps section .ARM.unwind_idx VMA [00000000007d7000,000000000080b8ef]
>> arm-linux-gnueabi-ld: section .ARM.unwind_tab VMA [000000000080b8f0,000000000080febb] overlaps section .data VMA [0000000000808000,00000000008829bf]
>> kernel/bpf/syscall.o: In function `__bpf_map_area_alloc':
>>>> kernel/bpf/syscall.c:154: undefined reference to `vmalloc_user_node_flags'
> Can't repro this with given config on x86_64. Trying to make make.cross
> work for me still. Any ideas why this is happening?
Hi Andrii,
We can reproduce it with make.cross command.
xsang(a)xsang-OptiPlex-9020:~/OLT-10114/linux-next$ GCC_VERSION=7.4.0 make.cross ARCH=arm
make CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y CROSS_COMPILE=/home/xsang/0day/gcc-7.4.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi- --jobs=16 ARCH=arm
...
CC include/uapi/linux/netfilter/ipset/ip_set_hash.h.s
GEN .version
CHK include/generated/compile.h
LD vmlinux.o
MODPOST vmlinux.o
WARNING:"return_address" [vmlinux] is astatic EXPORT_SYMBOL_GPL
MODINFO modules.builtin.modinfo
LD .tmp_vmlinux1
/home/xsang/0day/gcc-7.4.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: section .data VMA [0000000000808000,00000000008829bf] overlaps section .init.text VMA [00000000007f4db0,0000000000814207]
/home/xsang/0day/gcc-7.4.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: section .exit.text VMA [0000000000814208,0000000000817593] overlaps section .data VMA [0000000000808000,00000000008829bf]
kernel/bpf/syscall.o: In function `__bpf_map_area_alloc':
/home/xsang/OLT-10114/linux-next/kernel/bpf/syscall.c:154: undefined reference to `vmalloc_user_node_flags'
Makefile:1074: recipefor target'vmlinux' failed
make: *** [vmlinux] Error 1
Best Regards,
Rong Chen
> I see that
> __vmalloc_node_flags_caller that we also use if #ifdef'ed as static
> inline in include/linux/vmalloc.h if no CONFIG_MMU is defined. Are we
> missing some config dependency or should I do the same trick as
> __vmalloc_node_flags_caller does?
>
> Also. Daniel, when I tried to build latest bpf-next with this config, I
> got another compilation error, related to your recent patch, you might
> want to take a look as well:
>
> CC kernel/tracepoint.o
> CC kernel/elfcore.o
> /data/users/andriin/linux/kernel/bpf/verifier.c: In function
> ‘fixup_bpf_calls’:
> /data/users/andriin/linux/kernel/bpf/verifier.c:9132:25: error: implicit
> declaration of function ‘bpf_jit_blinding_enabled’; did you mean
> ‘bpf_jit_kallsyms_enabled’? [-Werror=implicit-function-declaration]
> bool expect_blinding = bpf_jit_blinding_enabled(prog);
> ^~~~~~~~~~~~~~~~~~~~~~~~
> bpf_jit_kallsyms_enabled
> CC kernel/irq_work.o
> CC kernel/crash_dump.o
>
>> vim +154 kernel/bpf/syscall.c
>>
>> 129
>> 130 static void *__bpf_map_area_alloc(size_t size, int numa_node, bool mmapable)
>> 131 {
>> 132 /* We really just want to fail instead of triggering OOM killer
>> 133 * under memory pressure, therefore we set __GFP_NORETRY to kmalloc,
>> 134 * which is used for lower order allocation requests.
>> 135 *
>> 136 * It has been observed that higher order allocation requests done by
>> 137 * vmalloc with __GFP_NORETRY being set might fail due to not trying
>> 138 * to reclaim memory from the page cache, thus we set
>> 139 * __GFP_RETRY_MAYFAIL to avoid such situations.
>> 140 */
>> 141
>> 142 const gfp_t flags = __GFP_NOWARN | __GFP_ZERO;
>> 143 void *area;
>> 144
>> 145 /* kmalloc()'ed memory can't be mmap()'ed */
>> 146 if (!mmapable && size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) {
>> 147 area = kmalloc_node(size, GFP_USER | __GFP_NORETRY | flags,
>> 148 numa_node);
>> 149 if (area != NULL)
>> 150 return area;
>> 151 }
>> 152 if (mmapable) {
>> 153 BUG_ON(!PAGE_ALIGNED(size));
>> > 154 return vmalloc_user_node_flags(size, numa_node, GFP_KERNEL |
>> 155 __GFP_RETRY_MAYFAIL | flags);
>> 156 }
>> 157 return __vmalloc_node_flags_caller(size, numa_node,
>> 158 GFP_KERNEL | __GFP_RETRY_MAYFAIL |
>> 159 flags, __builtin_return_address(0));
>> 160 }
>> 161
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology Center
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.01.org_hyperkitty_list_kbuild-2Dall-40lists.01.org&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=vxqvl81C2rT6GOGdPyz8iQ&m=OyqPkKr2ayhE9rsjQ3V9TjPHNWGAzMj67odoKch8_YM&s=zQax2z98Tn-V1wcH0rtwmJ0iA9DpFhqbVNzexx7wOWw&e= Intel Corporation
>>
> _______________________________________________
> kbuild-all mailing list -- kbuild-all(a)lists.01.org
> To unsubscribe send an email to kbuild-all-leave(a)lists.01.org
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 8261 bytes --]
next prev parent reply other threads:[~2019-11-25 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-23 11:44 [linux-next:master 11808/13503] kernel/bpf/syscall.c:154: undefined reference to `vmalloc_user_node_flags' kbuild test robot
2019-11-23 17:37 ` Andrii Nakryiko
2019-11-23 17:37 ` Andrii Nakryiko
2019-11-25 7:42 ` Rong Chen [this message]
2019-11-25 17:53 ` [kbuild-all] " Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a9bdba3-ccbf-95d0-6033-467fa0f7eddd@intel.com \
--to=rong.a.chen@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.