* [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'?
@ 2020-04-25 20:25 kbuild test robot
2020-04-26 0:09 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2020-04-25 20:25 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: kbuild-all, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 3880 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8bdabd09ec86a993419c8c98a4f34c12bc902c6c
commit: d4493a599f1aa34153b047da482cf6419f3c79dc [4466/4894] mm: remove vmalloc_user_node_flags
config: riscv-randconfig-a001-20200426 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d4493a599f1aa34153b047da482cf6419f3c79dc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from kernel/bpf/syscall.c:8:
arch/riscv/include/asm/perf_event.h:26:2: error: #error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
26 | #error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
| ^~~~~
arch/riscv/include/asm/perf_event.h:54:28: error: 'RISCV_MAX_COUNTERS' undeclared here (not in a function); did you mean 'RISCV_BASE_COUNTERS'?
54 | struct perf_event *events[RISCV_MAX_COUNTERS];
| ^~~~~~~~~~~~~~~~~~
| RISCV_BASE_COUNTERS
kernel/bpf/syscall.c: In function '__bpf_map_area_alloc':
>> kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared (first use in this function); did you mean 'VM_LOCKED'?
305 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END,
| ^~~~~~~~~~~
| VM_LOCKED
kernel/bpf/syscall.c:305:58: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/bpf/syscall.c:308:1: warning: control reaches end of non-void function [-Wreturn-type]
308 | }
| ^
vim +305 kernel/bpf/syscall.c
272
273 static void *__bpf_map_area_alloc(u64 size, int numa_node, bool mmapable)
274 {
275 /* We really just want to fail instead of triggering OOM killer
276 * under memory pressure, therefore we set __GFP_NORETRY to kmalloc,
277 * which is used for lower order allocation requests.
278 *
279 * It has been observed that higher order allocation requests done by
280 * vmalloc with __GFP_NORETRY being set might fail due to not trying
281 * to reclaim memory from the page cache, thus we set
282 * __GFP_RETRY_MAYFAIL to avoid such situations.
283 */
284
285 const gfp_t gfp = __GFP_NOWARN | __GFP_ZERO;
286 unsigned int flags = 0;
287 unsigned long align = 1;
288 void *area;
289
290 if (size >= SIZE_MAX)
291 return NULL;
292
293 /* kmalloc()'ed memory can't be mmap()'ed */
294 if (mmapable) {
295 BUG_ON(!PAGE_ALIGNED(size));
296 align = SHMLBA;
297 flags = VM_USERMAP;
298 } else if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) {
299 area = kmalloc_node(size, gfp | GFP_USER | __GFP_NORETRY,
300 numa_node);
301 if (area != NULL)
302 return area;
303 }
304
> 305 return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END,
306 gfp | GFP_KERNEL | __GFP_RETRY_MAYFAIL, PAGE_KERNEL,
307 flags, numa_node, __builtin_return_address(0));
> 308 }
309
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28713 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'?
2020-04-25 20:25 [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'? kbuild test robot
@ 2020-04-26 0:09 ` Andrew Morton
2020-04-26 7:43 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2020-04-26 0:09 UTC (permalink / raw)
To: kbuild test robot
Cc: Christoph Hellwig, kbuild-all, Linux Memory Management List
On Sun, 26 Apr 2020 04:25:54 +0800 kbuild test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 8bdabd09ec86a993419c8c98a4f34c12bc902c6c
> commit: d4493a599f1aa34153b047da482cf6419f3c79dc [4466/4894] mm: remove vmalloc_user_node_flags
> config: riscv-randconfig-a001-20200426 (attached as .config)
> compiler: riscv64-linux-gcc (GCC) 9.3.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout d4493a599f1aa34153b047da482cf6419f3c79dc
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=riscv
>
> kernel/bpf/syscall.c: In function '__bpf_map_area_alloc':
> >> kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared (first use in this function); did you mean 'VM_LOCKED'?
> 305 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END,
CONFIG_MMU=n.
I guess this will suffice?
--- a/arch/riscv/include/asm/pgtable.h~mm-switch-the-test_vmalloc-module-to-use-__vmalloc_node-fix-fix
+++ a/arch/riscv/include/asm/pgtable.h
@@ -472,9 +472,9 @@ static inline int ptep_clear_flush_young
#define PAGE_KERNEL __pgprot(0)
#define swapper_pg_dir NULL
+#define TASK_SIZE 0xffffffffUL
#define VMALLOC_START 0
-
-#define TASK_SIZE 0xffffffffUL
+#define VMALLOC_END TASK_SIZE
#endif /* !CONFIG_MMU */
It could be any value, really - we just need VMALLOC_END there to make
the compiler happy.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'?
2020-04-26 0:09 ` Andrew Morton
@ 2020-04-26 7:43 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-04-26 7:43 UTC (permalink / raw)
To: Andrew Morton
Cc: kbuild test robot, Christoph Hellwig, kbuild-all,
Linux Memory Management List, Alexei Starovoitov,
Daniel Borkmann
On Sat, Apr 25, 2020 at 05:09:09PM -0700, Andrew Morton wrote:
> On Sun, 26 Apr 2020 04:25:54 +0800 kbuild test robot <lkp@intel.com> wrote:
>
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 8bdabd09ec86a993419c8c98a4f34c12bc902c6c
> > commit: d4493a599f1aa34153b047da482cf6419f3c79dc [4466/4894] mm: remove vmalloc_user_node_flags
> > config: riscv-randconfig-a001-20200426 (attached as .config)
> > compiler: riscv64-linux-gcc (GCC) 9.3.0
> > reproduce:
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > git checkout d4493a599f1aa34153b047da482cf6419f3c79dc
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=riscv
> >
> > kernel/bpf/syscall.c: In function '__bpf_map_area_alloc':
> > >> kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared (first use in this function); did you mean 'VM_LOCKED'?
> > 305 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END,
>
> CONFIG_MMU=n.
>
> I guess this will suffice?
It should. But I wonder if BPF actually even has a chance of working
on nommu configs..
>
> --- a/arch/riscv/include/asm/pgtable.h~mm-switch-the-test_vmalloc-module-to-use-__vmalloc_node-fix-fix
> +++ a/arch/riscv/include/asm/pgtable.h
> @@ -472,9 +472,9 @@ static inline int ptep_clear_flush_young
>
> #define PAGE_KERNEL __pgprot(0)
> #define swapper_pg_dir NULL
> +#define TASK_SIZE 0xffffffffUL
> #define VMALLOC_START 0
> -
> -#define TASK_SIZE 0xffffffffUL
> +#define VMALLOC_END TASK_SIZE
>
> #endif /* !CONFIG_MMU */
>
>
> It could be any value, really - we just need VMALLOC_END there to make
> the compiler happy.
---end quoted text---
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-26 7:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 20:25 [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'? kbuild test robot
2020-04-26 0:09 ` Andrew Morton
2020-04-26 7:43 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox