lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210211352.fYh3MGHq-lkp@intel.com>
Date:   Fri, 21 Oct 2022 13:22:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [arm-integrator:kernel-in-vmalloc-v6.1-rc1 26/26]
 arch/arm/mm/idmap.c:153:34: error: incompatible integer to pointer
 conversion passing 'unsigned int' to parameter of type 'const char *'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v6.1-rc1
head:   dd354395fff14a411a8b85bd2a9d70e3a43e393b
commit: dd354395fff14a411a8b85bd2a9d70e3a43e393b [26/26] HACK: map in the first section of the kernel in the identity map
config: arm-randconfig-r003-20221019
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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/linusw/linux-integrator.git/commit/?id=dd354395fff14a411a8b85bd2a9d70e3a43e393b
        git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
        git fetch --no-tags arm-integrator kernel-in-vmalloc-v6.1-rc1
        git checkout dd354395fff14a411a8b85bd2a9d70e3a43e393b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/mm/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   arch/arm/mm/idmap.c:129:53: warning: format specifies type 'unsigned long long' but the argument has type 'pmdval_t *' (aka 'unsigned int *') [-Wformat]
                   pr_info("pgd%d @%08x = 0x%016llx\n", i, (u32)tmp, *tmp);
                                            ~~~~~~~                  ^~~~
   include/linux/printk.h:530:34: note: expanded from macro 'pr_info'
           printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   include/linux/printk.h:457:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   arch/arm/mm/idmap.c:137:77: warning: format specifies type 'unsigned long long' but the argument has type 'pmd_t' (aka 'unsigned int') [-Wformat]
                                   pr_info("  p4d/pud/pmd%d @%08x = %016llx, address %08x\n", j, (u32)pmd, *pmd, addr);
                                                                    ~~~~~~~                                ^~~~
                                                                    %016x
   include/linux/printk.h:530:34: note: expanded from macro 'pr_info'
           printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   include/linux/printk.h:457:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
>> arch/arm/mm/idmap.c:153:34: error: incompatible integer to pointer conversion passing 'unsigned int' to parameter of type 'const char *' [-Wint-conversion]
           identity_mapping_add(idmap_pgd, 0x80000000,
                                           ^~~~~~~~~~
   arch/arm/mm/idmap.c:86:58: note: passing argument to parameter 'text_start' here
   static void identity_mapping_add(pgd_t *pgd, const char *text_start,
                                                            ^
   arch/arm/mm/idmap.c:154:9: error: incompatible integer to pointer conversion passing 'unsigned int' to parameter of type 'const char *' [-Wint-conversion]
                                0x801fffff, 0);
                                ^~~~~~~~~~
   arch/arm/mm/idmap.c:87:18: note: passing argument to parameter 'text_end' here
                                    const char *text_end, unsigned long prot)
                                                ^
   2 warnings and 2 errors generated.


vim +153 arch/arm/mm/idmap.c

   143	
   144	static int __init init_static_idmap(void)
   145	{
   146		idmap_pgd = pgd_alloc(&init_mm);
   147		if (!idmap_pgd)
   148			return -ENOMEM;
   149	
   150		pr_info("Created LPAE PGD pgd = %08x, *pgd = %08x\n",
   151			(u32)idmap_pgd, (u32)*idmap_pgd);
   152	
 > 153		identity_mapping_add(idmap_pgd, 0x80000000,
   154				     0x801fffff, 0);
   155		identity_mapping_add(idmap_pgd, __idmap_text_start,
   156				     __idmap_text_end, 0);
   157	
   158		//dump_pagetable(idmap_pgd);
   159	
   160		/* Flush L1 for the hardware to see this page table content */
   161		if (!(elf_hwcap & HWCAP_LPAE))
   162			flush_cache_louis();
   163	
   164		return 0;
   165	}
   166	early_initcall(init_static_idmap);
   167	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (161485 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ