[tip:WIP.x86/pti 20/70] arch/x86/mm/kasan_init_64.c:158:2: error: implicit declaration of function 'kasan_populate_shadow'; did you mean 'kasan_populate_zero_shadow'?

From: kbuild test robot
Date: Tue Dec 05 2017 - 10:09:35 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/pti
head: 16db81a1bfe0974b6ed3ed102150e23449ab0c7f
commit: ba3c7d99755557a2724d42bf728cbfe7a401539f [20/70] x86/kasan/64: Teach KASAN about the cpu_entry_area
config: x86_64-randconfig-x018-201749 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
git checkout ba3c7d99755557a2724d42bf728cbfe7a401539f
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

arch/x86/mm/kasan_init_64.c: In function 'kasan_init':
>> arch/x86/mm/kasan_init_64.c:158:2: error: implicit declaration of function 'kasan_populate_shadow'; did you mean 'kasan_populate_zero_shadow'? [-Werror=implicit-function-declaration]
kasan_populate_shadow((unsigned long)shadow_cpu_entry_begin,
^~~~~~~~~~~~~~~~~~~~~
kasan_populate_zero_shadow
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
Cyclomatic Complexity 2 arch/x86/include/asm/page_64.h:__phys_addr_nodebug
Cyclomatic Complexity 1 arch/x86/include/asm/pgtable_types.h:native_pgd_val
Cyclomatic Complexity 1 include/asm-generic/pgtable-nop4d.h:p4d_offset
Cyclomatic Complexity 1 arch/x86/include/asm/pgtable_types.h:native_p4d_val
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:write_cr3
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__flush_tlb
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__flush_tlb_global
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__pte
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__pgd
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:set_pte
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__pmd
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:__pud
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:set_p4d
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:p4d_clear
Cyclomatic Complexity 1 include/linux/kasan.h:kasan_mem_to_shadow
Cyclomatic Complexity 2 arch/x86/include/asm/tlbflush.h:__flush_tlb_all
Cyclomatic Complexity 2 arch/x86/mm/kasan_init_64.c:clear_pgds
Cyclomatic Complexity 2 arch/x86/mm/kasan_init_64.c:kasan_map_early_shadow
Cyclomatic Complexity 1 arch/x86/mm/kasan_init_64.c:map_range
Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:load_cr3
Cyclomatic Complexity 2 arch/x86/mm/kasan_init_64.c:kasan_die_handler
Cyclomatic Complexity 4 arch/x86/mm/kasan_init_64.c:kasan_early_init
Cyclomatic Complexity 4 arch/x86/mm/kasan_init_64.c:kasan_init
Cyclomatic Complexity 1 arch/x86/mm/kasan_init_64.c:_GLOBAL__sub_I_00100_0_kasan_early_init
Cyclomatic Complexity 1 arch/x86/mm/kasan_init_64.c:_GLOBAL__sub_D_00100_1_kasan_early_init
cc1: some warnings being treated as errors

vim +158 arch/x86/mm/kasan_init_64.c

120
121 memcpy(early_top_pgt, init_top_pgt, sizeof(early_top_pgt));
122 load_cr3(early_top_pgt);
123 __flush_tlb_all();
124
125 clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END);
126
127 kasan_populate_zero_shadow((void *)KASAN_SHADOW_START,
128 kasan_mem_to_shadow((void *)PAGE_OFFSET));
129
130 for (i = 0; i < E820_MAX_ENTRIES; i++) {
131 if (pfn_mapped[i].end == 0)
132 break;
133
134 if (map_range(&pfn_mapped[i]))
135 panic("kasan: unable to allocate shadow!");
136 }
137 kasan_populate_zero_shadow(
138 kasan_mem_to_shadow((void *)PAGE_OFFSET + MAXMEM),
139 kasan_mem_to_shadow((void *)__START_KERNEL_map));
140
141 vmemmap_populate((unsigned long)kasan_mem_to_shadow(_stext),
142 (unsigned long)kasan_mem_to_shadow(_end),
143 NUMA_NO_NODE);
144
145 shadow_cpu_entry_begin = (void *)__fix_to_virt(FIX_CPU_ENTRY_AREA_BOTTOM);
146 shadow_cpu_entry_begin = kasan_mem_to_shadow(shadow_cpu_entry_begin);
147 shadow_cpu_entry_begin = (void *)round_down((unsigned long)shadow_cpu_entry_begin,
148 PAGE_SIZE);
149
150 shadow_cpu_entry_end = (void *)(__fix_to_virt(FIX_CPU_ENTRY_AREA_TOP) + PAGE_SIZE);
151 shadow_cpu_entry_end = kasan_mem_to_shadow(shadow_cpu_entry_end);
152 shadow_cpu_entry_end = (void *)round_up((unsigned long)shadow_cpu_entry_end,
153 PAGE_SIZE);
154
155 kasan_populate_zero_shadow(kasan_mem_to_shadow((void *)MODULES_END),
156 shadow_cpu_entry_begin);
157
> 158 kasan_populate_shadow((unsigned long)shadow_cpu_entry_begin,

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

Attachment: .config.gz
Description: application/gzip