From: kernel test robot <lkp@intel.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: arch/arm/mm/kasan_init.c:229:9: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *'
Date: Tue, 13 Jul 2021 18:45:10 +0800 [thread overview]
Message-ID: <202107131801.4d3g9jdN-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4842 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7fef2edf7cc753b51f7ccc74993971b0a9c81eca
commit: dc4875f0e791de554bdc45aa1dbd6e45e107e50f mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t *
date: 5 days ago
config: arm-buildonly-randconfig-r002-20210713 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dc4875f0e791de554bdc45aa1dbd6e45e107e50f
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout dc4875f0e791de554bdc45aa1dbd6e45e107e50f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/mm/kasan_init.c:229:9: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
pgd_page_vaddr(*pgd_offset_k(KASAN_SHADOW_START)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/pgtable-nop4d.h:44:31: note: expanded from macro 'pgd_page_vaddr'
#define pgd_page_vaddr(pgd) ((unsigned long)(p4d_pgtable((p4d_t){ pgd })))
^
arch/arm/include/asm/string.h:58:45: note: expanded from macro 'memcpy'
#define memcpy(dst, src, len) __memcpy(dst, src, len)
^~~
arch/arm/include/asm/string.h:21:47: note: passing argument to parameter 'src' here
extern void *__memcpy(void *dest, const void *src, __kernel_size_t n);
^
1 warning generated.
vim +229 arch/arm/mm/kasan_init.c
5615f69bc20974 Linus Walleij 2020-10-25 204
5615f69bc20974 Linus Walleij 2020-10-25 205 void __init kasan_init(void)
5615f69bc20974 Linus Walleij 2020-10-25 206 {
5615f69bc20974 Linus Walleij 2020-10-25 207 phys_addr_t pa_start, pa_end;
5615f69bc20974 Linus Walleij 2020-10-25 208 u64 i;
5615f69bc20974 Linus Walleij 2020-10-25 209
5615f69bc20974 Linus Walleij 2020-10-25 210 /*
5615f69bc20974 Linus Walleij 2020-10-25 211 * We are going to perform proper setup of shadow memory.
5615f69bc20974 Linus Walleij 2020-10-25 212 *
5615f69bc20974 Linus Walleij 2020-10-25 213 * At first we should unmap early shadow (clear_pgds() call bellow).
5615f69bc20974 Linus Walleij 2020-10-25 214 * However, instrumented code can't execute without shadow memory.
5615f69bc20974 Linus Walleij 2020-10-25 215 *
5615f69bc20974 Linus Walleij 2020-10-25 216 * To keep the early shadow memory MMU tables around while setting up
5615f69bc20974 Linus Walleij 2020-10-25 217 * the proper shadow memory, we copy swapper_pg_dir (the initial page
5615f69bc20974 Linus Walleij 2020-10-25 218 * table) to tmp_pgd_table and use that to keep the early shadow memory
5615f69bc20974 Linus Walleij 2020-10-25 219 * mapped until the full shadow setup is finished. Then we swap back
5615f69bc20974 Linus Walleij 2020-10-25 220 * to the proper swapper_pg_dir.
5615f69bc20974 Linus Walleij 2020-10-25 221 */
5615f69bc20974 Linus Walleij 2020-10-25 222
5615f69bc20974 Linus Walleij 2020-10-25 223 memcpy(tmp_pgd_table, swapper_pg_dir, sizeof(tmp_pgd_table));
5615f69bc20974 Linus Walleij 2020-10-25 224 #ifdef CONFIG_ARM_LPAE
5615f69bc20974 Linus Walleij 2020-10-25 225 /* We need to be in the same PGD or this won't work */
5615f69bc20974 Linus Walleij 2020-10-25 226 BUILD_BUG_ON(pgd_index(KASAN_SHADOW_START) !=
5615f69bc20974 Linus Walleij 2020-10-25 227 pgd_index(KASAN_SHADOW_END));
5615f69bc20974 Linus Walleij 2020-10-25 228 memcpy(tmp_pmd_table,
5615f69bc20974 Linus Walleij 2020-10-25 @229 pgd_page_vaddr(*pgd_offset_k(KASAN_SHADOW_START)),
:::::: The code at line 229 was first introduced by commit
:::::: 5615f69bc2097452ecc954f5264d784e158d6801 ARM: 9016/2: Initialize the mapping of KASan shadow memory
:::::: TO: Linus Walleij <linus.walleij@linaro.org>
:::::: CC: Russell King <rmk+kernel@armlinux.org.uk>
---
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: 25798 bytes --]
reply other threads:[~2021-07-13 10:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202107131801.4d3g9jdN-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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