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: <202204191122.Mc8zEXBp-lkp@intel.com>
Date:   Tue, 19 Apr 2022 11:36:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 1729/2356] mm/damon/ops-common.c:24:15:
 warning: incompatible integer to pointer conversion initializing 'struct
 page *' with an expression of type 'int'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   af93551cf39027d176f30b9beafc60a4c130998a
commit: 7eedc6a3354abcdcb3fbec4de62d4df0fa11c55d [1729/2356] headers/deps: mm/mmzone: Optimize <linux/mmzone.h> dependencies, remove <linux/memory_hotplug.h> inclusion
config: i386-randconfig-a015-20220418 (https://download.01.org/0day-ci/archive/20220419/202204191122.Mc8zEXBp-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
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/mingo/tip.git/commit/?id=7eedc6a3354abcdcb3fbec4de62d4df0fa11c55d
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 7eedc6a3354abcdcb3fbec4de62d4df0fa11c55d
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/block/ drivers/clk/ drivers/iio/accel/ drivers/infiniband/core/ drivers/infiniband/ulp/ipoib/ drivers/input/touchscreen/ drivers/mmc/host/ drivers/net/dsa/ drivers/nvdimm/ drivers/powercap/ drivers/usb/typec/ mm/damon/ net/dsa/ net/smc/ sound/soc/codecs/

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 >>):

   mm/damon/ops-common.c:24:22: error: implicit declaration of function 'pfn_to_online_page' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           struct page *page = pfn_to_online_page(pfn);
                               ^
>> mm/damon/ops-common.c:24:15: warning: incompatible integer to pointer conversion initializing 'struct page *' with an expression of type 'int' [-Wint-conversion]
           struct page *page = pfn_to_online_page(pfn);
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.


vim +24 mm/damon/ops-common.c

46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  14  
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  15  /*
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  16   * Get an online page for a pfn if it's in the LRU list.  Otherwise, returns
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  17   * NULL.
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  18   *
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  19   * The body of this function is stolen from the 'page_idle_get_page()'.  We
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  20   * steal rather than reuse it because the code is quite simple.
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  21   */
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  22  struct page *damon_get_page(unsigned long pfn)
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  23  {
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 @24  	struct page *page = pfn_to_online_page(pfn);
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  25  
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  26  	if (!page || !PageLRU(page) || !get_page_unless_zero(page))
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  27  		return NULL;
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  28  
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  29  	if (unlikely(!PageLRU(page))) {
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  30  		put_page(page);
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  31  		page = NULL;
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  32  	}
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  33  	return page;
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  34  }
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05  35  

:::::: The code at line 24 was first introduced by commit
:::::: 46c3a0accdc48c86928157fd073e66807f338485 mm/damon/vaddr: separate commonly usable functions

:::::: TO: SeongJae Park <sj@...nel.org>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ