Hi,
I love your patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.10-rc7]
[cannot apply to mmotm/master rcu/dev rcu/rcu/next next-20201208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/paulmck-kernel-org/mm-Add-mem_du...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
09162bc32c880a791c6c0668ce0745cf7958f576
config: x86_64-randconfig-a004-20201208 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/c49050a9b3235279954c0b5d82abd90fa...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
paulmck-kernel-org/mm-Add-mem_dump_obj-to-print-source-of-memory-block/20201209-091546
git checkout c49050a9b3235279954c0b5d82abd90fa09d9359
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: mm/slab_common.o: in function `kmem_dump_obj':
> mm/slab_common.c:589: undefined reference to
`kmem_provenance'
vim +589 mm/slab_common.c
557
558 /**
559 * kmem_dump_obj - Print available slab provenance information
560 * @object: slab object for which to find provenance information.
561 *
562 * This function uses pr_cont(), so that the caller is expected to have
563 * printed out whatever preamble is appropriate. The provenance information
564 * depends on the type of object and on how much debugging is enabled.
565 * For a slab-cache object, the fact that it is a slab object is printed,
566 * and, if available, the slab name, return address, and stack trace from
567 * the allocation of that object.
568 *
569 * This function will splat if passed a pointer to a non-slab object.
570 * If you are not sure what type of object you have, you should instead
571 * use mem_dump_obj().
572 */
573 void kmem_dump_obj(void *object)
574 {
575 int i;
576 struct page *page;
577 struct kmem_provenance kp;
578
579 if (WARN_ON_ONCE(!virt_addr_valid(object)))
580 return;
581 page = virt_to_head_page(object);
582 if (WARN_ON_ONCE(!PageSlab(page))) {
583 pr_cont(" non-slab memory.\n");
584 return;
585 }
586 kp.kp_ptr = object;
587 kp.kp_page = page;
588 kp.kp_nstack = KS_ADDRS_COUNT;
589 kmem_provenance(&kp);
590 if
(page->slab_cache)
591 pr_cont(" slab %s", page->slab_cache->name);
592 else
593 pr_cont(" slab ");
594 if (kp.kp_ret)
595 pr_cont(" allocated at %pS\n", kp.kp_ret);
596 else
597 pr_cont("\n");
598 if (kp.kp_stack[0]) {
599 for (i = 0; i < ARRAY_SIZE(kp.kp_stack); i++) {
600 if (!kp.kp_stack[i])
601 break;
602 pr_info(" %pS\n", kp.kp_stack[i]);
603 }
604 }
605 }
606 EXPORT_SYMBOL_GPL(kmem_dump_obj);
607
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org