public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'?
Date: Sun, 26 Apr 2020 04:25:54 +0800	[thread overview]
Message-ID: <202004260449.YsixxTC2%lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2020-04-25 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 20:25 kbuild test robot [this message]
2020-04-26  0:09 ` [linux-next:master 4466/4894] kernel/bpf/syscall.c:305:58: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'? Andrew Morton
2020-04-26  7:43   ` Christoph Hellwig

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=202004260449.YsixxTC2%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox