All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul E. McKenney <paulmck@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 sl-b 1/5] mm: Add mem_dump_obj() to print source of memory block
Date: Wed, 09 Dec 2020 08:51:46 -0800	[thread overview]
Message-ID: <20201209165146.GB2657@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <202012091313.dJgSfSQv-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3909 bytes --]

On Wed, Dec 09, 2020 at 01:36:50PM +0800, kernel test robot wrote:
> 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_dump_obj-to-print-source-of-memory-block/20201209-091546
> 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/c49050a9b3235279954c0b5d82abd90fa09d9359
>         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@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'

I will find a spot in mm/slab.c that is not under #ifdef sooner or
later...  Fix queued.  ;-)

							Thanx, Paul

> 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(a)lists.01.org


  reply	other threads:[~2020-12-09 16:51 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05  0:40 [PATCH RFC sl-b] Export return addresses for better diagnostics Paul E. McKenney
2020-12-05  0:40 ` [PATCH sl-b 1/6] mm: Add kmem_last_alloc() to return last allocation for memory block paulmck
2020-12-07  9:02   ` Joonsoo Kim
2020-12-07 17:25     ` Paul E. McKenney
2020-12-08  8:57       ` Joonsoo Kim
2020-12-08 15:17         ` Paul E. McKenney
2020-12-05  0:40 ` [PATCH sl-b 2/6] mm: Add kmem_last_alloc_errstring() to provide more kmem_last_alloc() info paulmck
2020-12-05  0:40 ` [PATCH sl-b 3/6] rcu: Make call_rcu() print allocation address of double-freed callback paulmck
2020-12-05  0:40 ` [PATCH sl-b 4/6] mm: Create kmem_last_alloc_stack() to provide stack trace in slub paulmck
2020-12-05  0:40 ` [PATCH sl-b 5/6] percpu_ref: Print allocator upon reference-count underflow paulmck
2020-12-05  0:40 ` [PATCH sl-b 6/6] percpu_ref: Print stack trace " paulmck
2020-12-09  1:11 ` [PATCH RFC v2 sl-b] Export return addresses etc. for better diagnostics Paul E. McKenney
2020-12-09  1:12   ` [PATCH v2 sl-b 1/5] mm: Add mem_dump_obj() to print source of memory block paulmck
2020-12-09  5:36     ` kernel test robot
2020-12-09 16:51       ` Paul E. McKenney [this message]
2020-12-09  8:17     ` Christoph Hellwig
2020-12-09 14:57       ` Paul E. McKenney
2020-12-09 17:53         ` Christoph Hellwig
2020-12-09 17:59           ` Paul E. McKenney
2020-12-09 17:28     ` Vlastimil Babka
2020-12-09 23:04       ` Paul E. McKenney
2020-12-10 10:48         ` Vlastimil Babka
2020-12-10 19:56           ` Paul E. McKenney
2020-12-10 12:04     ` Joonsoo Kim
2020-12-10 23:41       ` Paul E. McKenney
2020-12-09  1:13   ` [PATCH v2 sl-b 2/5] mm: Make mem_dump_obj() handle NULL and zero-sized pointers paulmck
2020-12-09 17:48     ` Vlastimil Babka
2020-12-10  3:25       ` Paul E. McKenney
2020-12-09  1:13   ` [PATCH v2 sl-b 3/5] mm: Make mem_dump_obj() handle vmalloc() memory paulmck
2020-12-09 17:51     ` Vlastimil Babka
2020-12-09 19:39       ` Uladzislau Rezki
2020-12-09 23:23       ` Paul E. McKenney
2020-12-10 10:49         ` Vlastimil Babka
2020-12-09 19:36     ` Uladzislau Rezki
2020-12-09 19:42       ` Paul E. McKenney
2020-12-09 20:04         ` Uladzislau Rezki
2020-12-09  1:13   ` [PATCH v2 sl-b 4/5] rcu: Make call_rcu() print mem_dump_obj() info for double-freed callback paulmck
2020-12-09  1:13   ` [PATCH v2 sl-b 5/5] percpu_ref: Dump mem_dump_obj() info upon reference-count underflow paulmck
2020-12-11  1:19   ` [PATCH RFC v2 sl-b] Export return addresses etc. for better diagnostics Paul E. McKenney
2020-12-11  1:19     ` [PATCH v3 sl-b 1/6] mm: Add mem_dump_obj() to print source of memory block paulmck
2020-12-11  2:22       ` Joonsoo Kim
2020-12-11  3:33         ` Paul E. McKenney
2020-12-11  3:42           ` Paul E. McKenney
2020-12-11  6:58             ` Joonsoo Kim
2020-12-11 16:59               ` Paul E. McKenney
2020-12-11  6:54           ` Joonsoo Kim
2020-12-11  1:19     ` [PATCH v3 sl-b 2/6] mm: Make mem_dump_obj() handle NULL and zero-sized pointers paulmck
2020-12-11  1:20     ` [PATCH v3 sl-b 3/6] mm: Make mem_dump_obj() handle vmalloc() memory paulmck
2020-12-11  1:20     ` [PATCH v3 sl-b 4/6] mm: Make mem_obj_dump() vmalloc() dumps include start and length paulmck
2020-12-11  1:20     ` [PATCH v3 sl-b 5/6] rcu: Make call_rcu() print mem_dump_obj() info for double-freed callback paulmck
2020-12-11  1:20     ` [PATCH v3 sl-b 6/6] percpu_ref: Dump mem_dump_obj() info upon reference-count underflow paulmck

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=20201209165146.GB2657@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.