Skip to contentSkip to conversation

mm/kasan/report.c:233:2: error: implicit declaration of function 'dump_stack_lvl'; did you mean 'dump_stack'?

PATCH In review kernel test robot 3 participants 3 messages May 13, 2021

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ec2618180c3450d06a6a4ba951d4c9a2c689b517
commit: 9fb7170c7fba3f6099d57b3d028c500df70a9980 [2605/2770] kasan: use dump_stack_lvl(KERN_ERR) to print stacks
config: arm64-randconfig-r014-20210513 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9fb7170c7fba3f6099d57b3d028c500df70a9980
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 9fb7170c7fba3f6099d57b3d028c500df70a9980
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm64

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

mm/kasan/report.c: In function 'print_address_description':

>> mm/kasan/report.c:233:2: error: implicit declaration of function 'dump_stack_lvl'; did you mean 'dump_stack'? [-Werror=implicit-function-declaration]
     233 |  dump_stack_lvl(KERN_ERR);
         |  ^~~~~~~~~~~~~~
         |  dump_stack

cc1: some warnings being treated as errors

vim +233 mm/kasan/report.c

228
229 static void print_address_description(void *addr, u8 tag)
230 {
231 struct page *page = kasan_addr_to_page(addr);
232

 > 233		dump_stack_lvl(KERN_ERR);

234 pr_err("\n");
235
236 if (page && PageSlab(page)) {
237 struct kmem_cache *cache = page->slab_cache;
238 void *object = nearest_obj(cache, page, addr);
239
240 describe_object(cache, object, addr, tag);
241 }
242
243 if (kernel_or_module_addr(addr) && !init_task_stack_addr(addr)) {
244 pr_err("The buggy address belongs to the variable:\n");
245 pr_err(" %pS\n", addr);
246 }
247
248 if (page) {
249 pr_err("The buggy address belongs to the page:\n");
250 dump_page(page, "kasan: bad access detected");
251 }
252
253 kasan_print_address_stack_frame(addr);
254 }
255

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#1 lore raw

PATCH 1/1 fix for "printk: introduce dump_stack_lvl()"

Add missing dump_stack_lvl() stub if CONFIG_PRINTK=n.

---
 include/linux/printk.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/printk.h +4 -0
index abe274305d79..f589b8b60806 100644
@@ -270,6 +270,10 @@ static inline void show_regs_print_info(const char *log_lvl)
 {
 }
 
+static inline void dump_stack_lvl(const char *log_lvl)
+{
+}
+
 static inline void dump_stack(void)
 {
 }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog