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: <202109180746.Jfaql6wt-lkp@intel.com>
Date:   Sat, 18 Sep 2021 07:19:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mike Rapoport <rppt@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, Mike Rapoport <rppt@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: [rppt-memblock:memblock_free-cleanup/v0 3/3]
 arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free'
 makes pointer from integer without a cast

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git memblock_free-cleanup/v0
head:   78a79c62f5f7e1099880e2d6caa2759747bcfded
commit: 78a79c62f5f7e1099880e2d6caa2759747bcfded [3/3] memblock: cleanup memblock_free interface
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git/commit/?id=78a79c62f5f7e1099880e2d6caa2759747bcfded
        git remote add rppt-memblock git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git
        git fetch --no-tags rppt-memblock memblock_free-cleanup/v0
        git checkout 78a79c62f5f7e1099880e2d6caa2759747bcfded
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=x86_64

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

All warnings (new ones prefixed by >>):

   arch/um/kernel/mem.c: In function 'mem_init':
>> arch/um/kernel/mem.c:50:16: warning: passing argument 1 of 'memblock_free' makes pointer from integer without a cast [-Wint-conversion]
      50 |  memblock_free(brk_end, uml_reserved - brk_end);
         |                ^~~~~~~
         |                |
         |                long unsigned int
   In file included from arch/um/kernel/mem.c:8:
   include/linux/memblock.h:120:26: note: expected 'void *' but argument is of type 'long unsigned int'
     120 | void memblock_free(void *ptr, size_t size);
         |                    ~~~~~~^~~
   arch/um/kernel/mem.c: At top level:
   arch/um/kernel/mem.c:184:8: warning: no previous prototype for 'pgd_alloc' [-Wmissing-prototypes]
     184 | pgd_t *pgd_alloc(struct mm_struct *mm)
         |        ^~~~~~~~~
   arch/um/kernel/mem.c:197:7: warning: no previous prototype for 'uml_kmalloc' [-Wmissing-prototypes]
     197 | void *uml_kmalloc(int size, int flags)
         |       ^~~~~~~~~~~
--
>> mm/memblock.c:821: warning: expecting prototype for memblock_free_phys(). Prototype was for memblock_phys_free() instead


vim +/memblock_free +50 arch/um/kernel/mem.c

    39	
    40	void __init mem_init(void)
    41	{
    42		/* clear the zero-page */
    43		memset(empty_zero_page, 0, PAGE_SIZE);
    44	
    45		/* Map in the area just after the brk now that kmalloc is about
    46		 * to be turned on.
    47		 */
    48		brk_end = (unsigned long) UML_ROUND_UP(sbrk(0));
    49		map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
  > 50		memblock_free(brk_end, uml_reserved - brk_end);
    51		uml_reserved = brk_end;
    52	
    53		/* this will put all low memory onto the freelists */
    54		memblock_free_all();
    55		max_low_pfn = totalram_pages();
    56		max_pfn = max_low_pfn;
    57		kmalloc_ok = 1;
    58	}
    59	

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

Download attachment ".config.gz" of type "application/gzip" (9645 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ