Web lists-archives.com

[tip:x86/mm 1/3] fs/proc/kcore.c:626:2: note: in expansion of macro 'if'




tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm
head:   45fc8757d1d2128e342b4e7ef39adedf7752faac
commit: f06bdd4001c257792c54dce9427399f2896470af [1/3] x86/mm: Adapt MODULES_END based on fixmap section size
config: x86_64-randconfig-s0-03162331 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout f06bdd4001c257792c54dce9427399f2896470af
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:4:0,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/mm.h:8,
                    from fs/proc/kcore.c:12:
   fs/proc/kcore.c: In function 'add_modules_range':
   arch/x86/include/asm/pgtable_64_types.h:72:23: error: implicit declaration of function '__fix_to_virt' [-Werror=implicit-function-declaration]
    #define MODULES_END   __fix_to_virt(__end_of_fixed_addresses + 1)
                          ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> fs/proc/kcore.c:626:2: note: in expansion of macro 'if'
     if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
     ^~
   fs/proc/kcore.c:626:40: note: in expansion of macro 'MODULES_END'
     if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
                                           ^~~~~~~~~~~
   arch/x86/include/asm/pgtable_64_types.h:72:37: error: '__end_of_fixed_addresses' undeclared (first use in this function)
    #define MODULES_END   __fix_to_virt(__end_of_fixed_addresses + 1)
                                        ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> fs/proc/kcore.c:626:2: note: in expansion of macro 'if'
     if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
     ^~
   fs/proc/kcore.c:626:40: note: in expansion of macro 'MODULES_END'
     if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
                                           ^~~~~~~~~~~
   arch/x86/include/asm/pgtable_64_types.h:72:37: note: each undeclared identifier is reported only once for each function it appears in
    #define MODULES_END   __fix_to_virt(__end_of_fixed_addresses + 1)
                                        ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> fs/proc/kcore.c:626:2: note: in expansion of macro 'if'
     if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
     ^~
   fs/proc/kcore.c:626:40: note: in expansion of macro 'MODULES_END'
     if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
                                           ^~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/if +626 fs/proc/kcore.c

9492587c KAMEZAWA Hiroyuki 2009-09-22  610  {
36e15263 Wu Fengguang      2010-05-26  611  	kclist_add(&kcore_text, _text, _end - _text, KCORE_TEXT);
9492587c KAMEZAWA Hiroyuki 2009-09-22  612  }
9492587c KAMEZAWA Hiroyuki 2009-09-22  613  #else
9492587c KAMEZAWA Hiroyuki 2009-09-22  614  static void __init proc_kcore_text_init(void)
9492587c KAMEZAWA Hiroyuki 2009-09-22  615  {
9492587c KAMEZAWA Hiroyuki 2009-09-22  616  }
9492587c KAMEZAWA Hiroyuki 2009-09-22  617  #endif
9492587c KAMEZAWA Hiroyuki 2009-09-22  618  
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  619  #if defined(CONFIG_MODULES) && defined(MODULES_VADDR)
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  620  /*
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  621   * MODULES_VADDR has no intersection with VMALLOC_ADDR.
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  622   */
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  623  struct kcore_list kcore_modules;
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  624  static void __init add_modules_range(void)
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  625  {
bf3e2692 Baoquan He        2014-10-09 @626  	if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  627  		kclist_add(&kcore_modules, (void *)MODULES_VADDR,
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  628  			MODULES_END - MODULES_VADDR, KCORE_VMALLOC);
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  629  	}
bf3e2692 Baoquan He        2014-10-09  630  }
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  631  #else
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  632  static void __init add_modules_range(void)
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  633  {
81ac3ad9 KAMEZAWA Hiroyuki 2009-09-22  634  }

:::::: The code at line 626 was first introduced by commit
:::::: bf3e2692468fe46eed57d18b3dd1af5b30049122 fs/proc/kcore.c: don't add modules range to kcore if it's equal to vmcore range

:::::: TO: Baoquan He <bhe@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip