On Wed, Mar 10, 2021 at 12:06 AM kernel test robot
<lkp(a)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/?...
> 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(a)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
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