linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sukrit Bhatnagar <Sukrit.Bhatnagar@sony.com>,
	Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Christoph Lameter <cl@linux-foundation.org>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, Sukrit.Bhatnagar@sony.com
Subject: Re: [PATCH 1/2] mm: printk: introduce new format %pGs for slab flags
Date: Thu, 23 May 2024 04:25:56 +0800	[thread overview]
Message-ID: <202405230441.A0LFA9SY-lkp@intel.com> (raw)
In-Reply-To: <20240522074629.2420423-2-Sukrit.Bhatnagar@sony.com>

Hi Sukrit,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on akpm-mm/mm-nonmm-unstable linus/master v6.9 next-20240522]
[cannot apply to vbabka-slab/for-next]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sukrit-Bhatnagar/mm-printk-introduce-new-format-pGs-for-slab-flags/20240522-154443
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20240522074629.2420423-2-Sukrit.Bhatnagar%40sony.com
patch subject: [PATCH 1/2] mm: printk: introduce new format %pGs for slab flags
config: x86_64-randconfig-123-20240522 (https://download.01.org/0day-ci/archive/20240523/202405230441.A0LFA9SY-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240523/202405230441.A0LFA9SY-lkp@intel.com/reproduce)

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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405230441.A0LFA9SY-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/test_printf.c:692:15: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long [addressable] [assigned] flags @@     got restricted slab_flags_t @@
   lib/test_printf.c:692:15: sparse:     expected unsigned long [addressable] [assigned] flags
   lib/test_printf.c:692:15: sparse:     got restricted slab_flags_t
   lib/test_printf.c:708:49: sparse: sparse: cast from restricted gfp_t
   lib/test_printf.c:712:58: sparse: sparse: cast from restricted gfp_t
   lib/test_printf.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
   include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
   include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false

vim +692 lib/test_printf.c

   656	
   657	static void __init
   658	flags(void)
   659	{
   660		unsigned long flags;
   661		char *cmp_buffer;
   662		gfp_t gfp;
   663		unsigned int page_type;
   664	
   665		cmp_buffer = kmalloc(BUF_SIZE, GFP_KERNEL);
   666		if (!cmp_buffer)
   667			return;
   668	
   669		flags = 0;
   670		page_flags_test(0, 0, 0, 0, 0, flags, "", cmp_buffer);
   671	
   672		flags = 1UL << NR_PAGEFLAGS;
   673		page_flags_test(0, 0, 0, 0, 0, flags, "", cmp_buffer);
   674	
   675		flags |= 1UL << PG_uptodate | 1UL << PG_dirty | 1UL << PG_lru
   676			| 1UL << PG_active | 1UL << PG_swapbacked;
   677		page_flags_test(1, 1, 1, 0x1fffff, 1, flags,
   678				"uptodate|dirty|lru|active|swapbacked",
   679				cmp_buffer);
   680	
   681		flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
   682		test("read|exec|mayread|maywrite|mayexec", "%pGv", &flags);
   683	
   684		flags = 0;
   685		scnprintf(cmp_buffer, BUF_SIZE, "%#x(%s)", (unsigned int) flags, "");
   686		test(cmp_buffer, "%pGs", &flags);
   687	
   688		flags = 1U << _SLAB_FLAGS_LAST_BIT;
   689		scnprintf(cmp_buffer, BUF_SIZE, "%#x(%s)", (unsigned int) flags, "");
   690		test(cmp_buffer, "%pGs", &flags);
   691	
 > 692		flags = SLAB_HWCACHE_ALIGN | SLAB_PANIC | SLAB_NO_USER_FLAGS;
   693		scnprintf(cmp_buffer, BUF_SIZE, "%#x(%s)", (unsigned int) flags,
   694			  "HWCACHE_ALIGN|PANIC|NO_USER_FLAGS");
   695		test(cmp_buffer, "%pGs", &flags);
   696	
   697		gfp = GFP_TRANSHUGE;
   698		test("GFP_TRANSHUGE", "%pGg", &gfp);
   699	
   700		gfp = GFP_ATOMIC|__GFP_DMA;
   701		test("GFP_ATOMIC|GFP_DMA", "%pGg", &gfp);
   702	
   703		gfp = __GFP_HIGH;
   704		test("__GFP_HIGH", "%pGg", &gfp);
   705	
   706		/* Any flags not translated by the table should remain numeric */
   707		gfp = ~__GFP_BITS_MASK;
   708		snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp);
   709		test(cmp_buffer, "%pGg", &gfp);
   710	
   711		snprintf(cmp_buffer, BUF_SIZE, "__GFP_HIGH|%#lx",
   712								(unsigned long) gfp);
   713		gfp |= __GFP_HIGH;
   714		test(cmp_buffer, "%pGg", &gfp);
   715	
   716		page_type = ~0;
   717		page_type_test(page_type, "", cmp_buffer);
   718	
   719		page_type = 10;
   720		page_type_test(page_type, "", cmp_buffer);
   721	
   722		page_type = ~PG_buddy;
   723		page_type_test(page_type, "buddy", cmp_buffer);
   724	
   725		page_type = ~(PG_table | PG_buddy);
   726		page_type_test(page_type, "table|buddy", cmp_buffer);
   727	
   728		kfree(cmp_buffer);
   729	}
   730	

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

  reply	other threads:[~2024-05-22 20:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22  7:46 [PATCH 0/2] Improve dump_page() output for slab pages Sukrit Bhatnagar
2024-05-22  7:46 ` [PATCH 1/2] mm: printk: introduce new format %pGs for slab flags Sukrit Bhatnagar
2024-05-22 20:25   ` kernel test robot [this message]
2024-05-22  7:46 ` [PATCH 2/2] mm: debug: print correct information for slab folios Sukrit Bhatnagar
2024-05-22 12:32   ` Matthew Wilcox
2024-05-27 10:46     ` Sukrit.Bhatnagar
2024-05-22 14:11 ` [PATCH 0/2] Improve dump_page() output for slab pages Matthew Wilcox
2024-05-27 10:48   ` Sukrit.Bhatnagar

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=202405230441.A0LFA9SY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=Sukrit.Bhatnagar@sony.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=cl@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=penberg@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).