All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android17-6.18 15/15] mm/page_owner.c:558 print_page_owner() error: '%pGp' expects argument of type 'unsigned long *', argument 8 has type 'struct memdesc_flags_t*'
@ 2026-10-07  4:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-07  4:37 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com

tree:   https://android.googlesource.com/kernel/common android17-6.18
head:   efe665b77332621017fded6de1496bfff20ae5c6
commit: 53fbef56e07df822ea3029109ffca25328c2e5ac [15/15] mm: introduce memdesc_flags_t
:::::: branch date: 6 hours ago
:::::: commit date: 1 year, 1 month ago
config: i386-randconfig-2200-20261006 (https://download.01.org/0day-ci/archive/20261007/202610070651.K1PgdJAF-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 53fbef56e07d ("mm: introduce memdesc_flags_t")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202610070651.K1PgdJAF-lkp@intel.com/

smatch warnings:
mm/page_owner.c:558 print_page_owner() error: '%pGp' expects argument of type 'unsigned long *', argument 8 has type 'struct memdesc_flags_t*'

vim +558 mm/page_owner.c

fcf8935832b86d Waiman Long             2022-03-24  534  
48c96a3685795e Joonsoo Kim             2014-12-12  535  static ssize_t
48c96a3685795e Joonsoo Kim             2014-12-12  536  print_page_owner(char __user *buf, size_t count, unsigned long pfn,
9300d8dfd282bd Joonsoo Kim             2016-10-07  537  		struct page *page, struct page_owner *page_owner,
f2ca0b55710752 Joonsoo Kim             2016-07-26  538  		depot_stack_handle_t handle)
48c96a3685795e Joonsoo Kim             2014-12-12  539  {
af52bf6b92f7d8 Thomas Gleixner         2019-04-25  540  	int ret, pageblock_mt, page_mt;
48c96a3685795e Joonsoo Kim             2014-12-12  541  	char *kbuf;
48c96a3685795e Joonsoo Kim             2014-12-12  542  
c8f61cfc871fad Miles Chen              2018-12-28  543  	count = min_t(size_t, count, PAGE_SIZE);
48c96a3685795e Joonsoo Kim             2014-12-12  544  	kbuf = kmalloc(count, GFP_KERNEL);
48c96a3685795e Joonsoo Kim             2014-12-12  545  	if (!kbuf)
48c96a3685795e Joonsoo Kim             2014-12-12  546  		return -ENOMEM;
48c96a3685795e Joonsoo Kim             2014-12-12  547  
3ebc4397612732 Waiman Long             2022-03-24  548  	ret = scnprintf(kbuf, count,
b459f0905eec31 Audra Mitchell          2023-10-13  549  			"Page allocated via order %u, mask %#x(%pGg), pid %d, tgid %d (%s), ts %llu ns\n",
9300d8dfd282bd Joonsoo Kim             2016-10-07  550  			page_owner->order, page_owner->gfp_mask,
9cc7e96aa846f9 Liam Mark               2020-12-14  551  			&page_owner->gfp_mask, page_owner->pid,
bf215eab785a30 Yixuan Cao              2022-03-24  552  			page_owner->tgid, page_owner->comm,
b459f0905eec31 Audra Mitchell          2023-10-13  553  			page_owner->ts_nsec);
48c96a3685795e Joonsoo Kim             2014-12-12  554  
48c96a3685795e Joonsoo Kim             2014-12-12  555  	/* Print information relevant to grouping pages by mobility */
0b423ca22f95a8 Mel Gorman              2016-05-19  556  	pageblock_mt = get_pageblock_migratetype(page);
01c0bfe061f309 Wei Yang                2020-06-03  557  	page_mt  = gfp_migratetype(page_owner->gfp_mask);
3ebc4397612732 Waiman Long             2022-03-24 @558  	ret += scnprintf(kbuf + ret, count - ret,
399fd496c49b39 Kassey Li               2023-06-13  559  			"PFN 0x%lx type %s Block %lu type %s Flags %pGp\n",
48c96a3685795e Joonsoo Kim             2014-12-12  560  			pfn,
60f30350fd69a3 Vlastimil Babka         2016-03-15  561  			migratetype_names[page_mt],
48c96a3685795e Joonsoo Kim             2014-12-12  562  			pfn >> pageblock_order,
60f30350fd69a3 Vlastimil Babka         2016-03-15  563  			migratetype_names[pageblock_mt],
23efd0804c0a86 Matthew Wilcox (Oracle  2021-10-19  564) 			&page->flags);
48c96a3685795e Joonsoo Kim             2014-12-12  565  
0f68d45ef41abb Imran Khan              2021-11-08  566  	ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
48c96a3685795e Joonsoo Kim             2014-12-12  567  	if (ret >= count)
48c96a3685795e Joonsoo Kim             2014-12-12  568  		goto err;
48c96a3685795e Joonsoo Kim             2014-12-12  569  
9300d8dfd282bd Joonsoo Kim             2016-10-07  570  	if (page_owner->last_migrate_reason != -1) {
3ebc4397612732 Waiman Long             2022-03-24  571  		ret += scnprintf(kbuf + ret, count - ret,
7cd12b4abfd2f8 Vlastimil Babka         2016-03-15  572  			"Page has been migrated, last migrate reason: %s\n",
9300d8dfd282bd Joonsoo Kim             2016-10-07  573  			migrate_reason_names[page_owner->last_migrate_reason]);
7cd12b4abfd2f8 Vlastimil Babka         2016-03-15  574  	}
7cd12b4abfd2f8 Vlastimil Babka         2016-03-15  575  
fcf8935832b86d Waiman Long             2022-03-24  576  	ret = print_page_owner_memcg(kbuf, count, ret, page);
fcf8935832b86d Waiman Long             2022-03-24  577  
48c96a3685795e Joonsoo Kim             2014-12-12  578  	ret += snprintf(kbuf + ret, count - ret, "\n");
48c96a3685795e Joonsoo Kim             2014-12-12  579  	if (ret >= count)
48c96a3685795e Joonsoo Kim             2014-12-12  580  		goto err;
48c96a3685795e Joonsoo Kim             2014-12-12  581  
48c96a3685795e Joonsoo Kim             2014-12-12  582  	if (copy_to_user(buf, kbuf, ret))
48c96a3685795e Joonsoo Kim             2014-12-12  583  		ret = -EFAULT;
48c96a3685795e Joonsoo Kim             2014-12-12  584  
48c96a3685795e Joonsoo Kim             2014-12-12  585  	kfree(kbuf);
48c96a3685795e Joonsoo Kim             2014-12-12  586  	return ret;
48c96a3685795e Joonsoo Kim             2014-12-12  587  
48c96a3685795e Joonsoo Kim             2014-12-12  588  err:
48c96a3685795e Joonsoo Kim             2014-12-12  589  	kfree(kbuf);
48c96a3685795e Joonsoo Kim             2014-12-12  590  	return -ENOMEM;
48c96a3685795e Joonsoo Kim             2014-12-12  591  }
48c96a3685795e Joonsoo Kim             2014-12-12  592  

:::::: The code at line 558 was first introduced by commit
:::::: 3ebc439761273274ea00258da84d997841f01e72 mm/page_owner: use scnprintf() to avoid excessive buffer overrun check

:::::: TO: Waiman Long <longman@redhat.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-07  4:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07  4:37 [android-common:android17-6.18 15/15] mm/page_owner.c:558 print_page_owner() error: '%pGp' expects argument of type 'unsigned long *', argument 8 has type 'struct memdesc_flags_t*' kernel test robot

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.