linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Daniel Axtens <dja@axtens.net>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,
	linux-s390@vger.kernel.org, linux-xtensa@linux-xtensa.org,
	linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	kasan-dev@googlegroups.com, christophe.leroy@c-s.fr,
	aneesh.kumar@linux.ibm.com, bsingharora@gmail.com,
	Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH v2 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support
Date: Tue, 10 Dec 2019 19:20:05 +0800	[thread overview]
Message-ID: <201912101903.uTvLRIgy%lkp@intel.com> (raw)
In-Reply-To: <20191210044714.27265-5-dja@axtens.net>

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

Hi Daniel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20191209]
[also build test ERROR on linus/master v5.5-rc1]
[cannot apply to powerpc/next asm-generic/master v5.4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Daniel-Axtens/KASAN-for-powerpc64-radix-plus-generic-mm-change/20191210-171342
base:    6cf8298daad041cd15dc514d8a4f93ca3636c84e
config: powerpc-allnoconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:15,
                    from arch/powerpc/kernel/prom.c:15:
   arch/powerpc/kernel/prom.c: In function 'early_reserve_mem':
>> include/linux/kern_levels.h:5:18: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' [-Werror=format=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
>> arch/powerpc/kernel/prom.c:694:4: note: in expansion of macro 'pr_err'
       pr_err("===========================================\n"
       ^~~~~~
   arch/powerpc/kernel/prom.c:697:48: note: format string is defined here
        "The actual physical memory detected is %llu MB.\n"
                                                ~~~^
                                                %u
   cc1: all warnings being treated as errors
--
   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:15,
                    from arch/powerpc//kernel/prom.c:15:
   arch/powerpc//kernel/prom.c: In function 'early_reserve_mem':
>> include/linux/kern_levels.h:5:18: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' [-Werror=format=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
   arch/powerpc//kernel/prom.c:694:4: note: in expansion of macro 'pr_err'
       pr_err("===========================================\n"
       ^~~~~~
   arch/powerpc//kernel/prom.c:697:48: note: format string is defined here
        "The actual physical memory detected is %llu MB.\n"
                                                ~~~^
                                                %u
   cc1: all warnings being treated as errors

vim +/pr_err +694 arch/powerpc/kernel/prom.c

   675	
   676		if (IS_ENABLED(CONFIG_KASAN) && IS_ENABLED(CONFIG_PPC_BOOK3S_64)) {
   677			kasan_memory_size =
   678				((phys_addr_t)CONFIG_PHYS_MEM_SIZE_FOR_KASAN << 20);
   679	
   680			if (top_phys_addr < kasan_memory_size) {
   681				/*
   682				 * We are doomed. Attempts to call e.g. panic() are
   683				 * likely to fail because they call out into
   684				 * instrumented code, which will almost certainly
   685				 * access memory beyond the end of physical
   686				 * memory. Hang here so that at least the NIP points
   687				 * somewhere that will help you debug it if you look at
   688				 * it in qemu.
   689				 */
   690				while (true)
   691					;
   692			} else if (top_phys_addr > kasan_memory_size) {
   693				/* print a biiiig warning in hopes people notice */
 > 694				pr_err("===========================================\n"
   695					"Physical memory exceeds compiled-in maximum!\n"
   696					"This kernel was compiled for KASAN with %u MB physical memory.\n"
   697					"The actual physical memory detected is %llu MB.\n"
   698					"Memory above the compiled limit will not be used!\n"
   699					"===========================================\n",
   700					CONFIG_PHYS_MEM_SIZE_FOR_KASAN,
   701					top_phys_addr / (1024 * 1024));
   702			}
   703	
   704			kasan_shadow_start = _ALIGN_DOWN(kasan_memory_size * 7 / 8,
   705							 PAGE_SIZE);
   706			DBG("reserving %llx -> %llx for KASAN",
   707			    kasan_shadow_start, top_phys_addr);
   708			memblock_reserve(kasan_shadow_start,
   709					 top_phys_addr - kasan_shadow_start);
   710		}
   711	}
   712	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

      parent reply	other threads:[~2019-12-10 11:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  4:47 [PATCH v2 0/4] KASAN for powerpc64 radix, plus generic mm change Daniel Axtens
2019-12-10  4:47 ` [PATCH v2 1/4] mm: define MAX_PTRS_PER_{PTE,PMD,PUD} Daniel Axtens
2019-12-10  6:35   ` Christophe Leroy
2019-12-10  9:35   ` Balbir Singh
2019-12-10 10:39   ` kbuild test robot
2019-12-10  4:47 ` [PATCH v2 2/4] kasan: use MAX_PTRS_PER_* for early shadow Daniel Axtens
2019-12-10  6:40   ` Christophe Leroy
2019-12-10  9:36   ` Balbir Singh
2019-12-10 14:39     ` Christophe Leroy
2019-12-10  4:47 ` [PATCH v2 3/4] kasan: Document support on 32-bit powerpc Daniel Axtens
2019-12-10  6:40   ` Christophe Leroy
2019-12-10  4:47 ` [PATCH v2 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support Daniel Axtens
2019-12-10  7:21   ` Christophe Leroy
2019-12-12 13:41     ` Daniel Axtens
2019-12-10 10:57   ` Balbir Singh
2019-12-11  5:21     ` Daniel Axtens
2019-12-11  8:57       ` Balbir Singh
2019-12-11 14:24         ` Daniel Axtens
2019-12-12  7:42           ` Balbir Singh
2019-12-12  9:38             ` Christophe Leroy
2019-12-12  9:56           ` Andrey Ryabinin
2019-12-10 11:20   ` kbuild test robot [this message]

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=201912101903.uTvLRIgy%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=bsingharora@gmail.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=dja@axtens.net \
    --cc=kasan-dev@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.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