All of lore.kernel.org
 help / color / mirror / Atom feed
* [printk:for-5.13-vsprintf-pgp 3/4] lib/test_printf.c:612:17: error: 'tag' undeclared
@ 2021-03-09 16:05 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-09 16:05 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git for-5.13-vsprintf-pgp
head:   3453afc70070c97100ce6a6e02c4f885682f3d88
commit: 2ce0893b9b8168d4b0e2e00cf3208dae4b964aab [3/4] vsprintf: dump full information of page flags in pGp
config: arm64-randconfig-r011-20210309 (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/printk/linux.git/commit/?id=2ce0893b9b8168d4b0e2e00cf3208dae4b964aab
        git remote add printk https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
        git fetch --no-tags printk for-5.13-vsprintf-pgp
        git checkout 2ce0893b9b8168d4b0e2e00cf3208dae4b964aab
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

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 >>):

   lib/test_printf.c: In function 'page_flags_test':
   lib/test_printf.c:595:17: error: 'sec' undeclared (first use in this function); did you mean 'sem'?
     595 |  page_flags |= (sec & SECTIONS_MASK) << SECTIONS_PGSHIFT;
         |                 ^~~
         |                 sem
   lib/test_printf.c:595:17: note: each undeclared identifier is reported only once for each function it appears in
>> lib/test_printf.c:612:17: error: 'tag' undeclared (first use in this function)
     612 |  page_flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT;
         |                 ^~~


vim +/tag +612 lib/test_printf.c

   579	
   580	static void __init
   581	page_flags_test(int section, int node, int zone, int last_cpupid,
   582			int kasan_tag, int flags, const char *name, char *cmp_buf)
   583	{
   584		unsigned long page_flags = 0;
   585		unsigned long size = 0;
   586	
   587		flags &= BIT(NR_PAGEFLAGS) - 1;
   588		if (flags) {
   589			page_flags |= flags;
   590			snprintf(cmp_buf + size, BUF_SIZE - size, "%s|", name);
   591			size = strlen(cmp_buf);
   592		}
   593	
   594	#ifdef SECTION_IN_PAGE_FLAGS
 > 595		page_flags |= (sec & SECTIONS_MASK) << SECTIONS_PGSHIFT;
   596		snprintf(cmp_buf + size, BUF_SIZE - size, "section=%#x|", sec);
   597		size = strlen(cmp_buf);
   598	#endif
   599	
   600		page_flags |= ((node & NODES_MASK) << NODES_PGSHIFT) |
   601				((zone & ZONES_MASK) << ZONES_PGSHIFT);
   602		snprintf(cmp_buf + size, BUF_SIZE - size, "node=%d|zone=%d", node, zone);
   603		size = strlen(cmp_buf);
   604	
   605	#ifndef LAST_CPUPID_NOT_IN_PAGE_FLAGS
   606		page_flags |= (last_cpupid & LAST_CPUPID_MASK) << LAST_CPUPID_PGSHIFT;
   607		snprintf(cmp_buf + size, BUF_SIZE - size, "|lastcpupid=%#x", last_cpupid);
   608		size = strlen(cmp_buf);
   609	#endif
   610	
   611	#if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS)
 > 612		page_flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT;
   613		snprintf(cmp_buf + size, BUF_SIZE - size, "|kasantag=%#x", tag);
   614		size = strlen(cmp_buf);
   615	#endif
   616	
   617		test(cmp_buf, "%pGp", &page_flags);
   618	}
   619	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35399 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [printk:for-5.13-vsprintf-pgp 3/4] lib/test_printf.c:612:17: error: 'tag' undeclared
       [not found] <CALOAHbCZPoXR0z5277LgbJZFuWv0Ju21pQb+kqFX6i1t-PkDzQ@mail.gmail.com>
@ 2021-03-10  9:45 ` Petr Mladek
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Mladek @ 2021-03-10  9:45 UTC (permalink / raw)
  To: kbuild-all

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

On Wed 2021-03-10 09:12:31, Yafang Shao wrote:
> On Wed, Mar 10, 2021 at 12:06 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git for-5.13-vsprintf-pgp
> > head:   3453afc70070c97100ce6a6e02c4f885682f3d88
> > commit: 2ce0893b9b8168d4b0e2e00cf3208dae4b964aab [3/4] vsprintf: dump full information of page flags in pGp
> > config: arm64-randconfig-r011-20210309 (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/printk/linux.git/commit/?id=2ce0893b9b8168d4b0e2e00cf3208dae4b964aab
> >         git remote add printk https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
> >         git fetch --no-tags printk for-5.13-vsprintf-pgp
> >         git checkout 2ce0893b9b8168d4b0e2e00cf3208dae4b964aab
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
> >
> > 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 >>):
> >
> >    lib/test_printf.c: In function 'page_flags_test':
> >    lib/test_printf.c:595:17: error: 'sec' undeclared (first use in this function); did you mean 'sem'?
> >      595 |  page_flags |= (sec & SECTIONS_MASK) << SECTIONS_PGSHIFT;
> >          |                 ^~~
> >          |                 sem
> >    lib/test_printf.c:595:17: note: each undeclared identifier is reported only once for each function it appears in
> > >> lib/test_printf.c:612:17: error: 'tag' undeclared (first use in this function)
> >      612 |  page_flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT;
> >          |                 ^~~
> >
> >
> > vim +/tag +612 lib/test_printf.c
> >
> >    579
> >    580  static void __init
> >    581  page_flags_test(int section, int node, int zone, int last_cpupid,
> >    582                  int kasan_tag, int flags, const char *name, char *cmp_buf)
> >    583  {
> >    584          unsigned long page_flags = 0;
> >    585          unsigned long size = 0;
> >    586
> >    587          flags &= BIT(NR_PAGEFLAGS) - 1;
> >    588          if (flags) {
> >    589                  page_flags |= flags;
> >    590                  snprintf(cmp_buf + size, BUF_SIZE - size, "%s|", name);
> >    591                  size = strlen(cmp_buf);
> >    592          }
> >    593
> >    594  #ifdef SECTION_IN_PAGE_FLAGS
> >  > 595          page_flags |= (sec & SECTIONS_MASK) << SECTIONS_PGSHIFT;
> >    596          snprintf(cmp_buf + size, BUF_SIZE - size, "section=%#x|", sec);
> >    597          size = strlen(cmp_buf);
> >    598  #endif
> >    599
> >    600          page_flags |= ((node & NODES_MASK) << NODES_PGSHIFT) |
> >    601                          ((zone & ZONES_MASK) << ZONES_PGSHIFT);
> >    602          snprintf(cmp_buf + size, BUF_SIZE - size, "node=%d|zone=%d", node, zone);
> >    603          size = strlen(cmp_buf);
> >    604
> >    605  #ifndef LAST_CPUPID_NOT_IN_PAGE_FLAGS
> >    606          page_flags |= (last_cpupid & LAST_CPUPID_MASK) << LAST_CPUPID_PGSHIFT;
> >    607          snprintf(cmp_buf + size, BUF_SIZE - size, "|lastcpupid=%#x", last_cpupid);
> >    608          size = strlen(cmp_buf);
> >    609  #endif
> >    610
> >    611  #if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS)
> >  > 612          page_flags |= (tag & KASAN_TAG_MASK) << KASAN_TAG_PGSHIFT;
> >    613          snprintf(cmp_buf + size, BUF_SIZE - size, "|kasantag=%#x", tag);
> >    614          size = strlen(cmp_buf);
> >    615  #endif
> >    616
> >    617          test(cmp_buf, "%pGp", &page_flags);
> >    618  }
> >    619
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> 
> 
> SECTION_IN_PAGE_FLAGS and CONFIG_KASAN_HW_TAGS are not set in my
> build, so I didn't catch this issue.
> I will post a fix.

OK, I'll wait for the patch.

I have temporary removed the patchset from the for-next branch because
it broke linux-next on these architectures.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-10  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 16:05 [printk:for-5.13-vsprintf-pgp 3/4] lib/test_printf.c:612:17: error: 'tag' undeclared kernel test robot
     [not found] <CALOAHbCZPoXR0z5277LgbJZFuWv0Ju21pQb+kqFX6i1t-PkDzQ@mail.gmail.com>
2021-03-10  9:45 ` Petr Mladek

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.