[arnd-asm-generic:asm-generic-fixes 1/1] drivers/char/mem.c:66:16: error: implicit declaration of function 'devmem_is_allowed'; did you mean 'page_is_allowed'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git asm-generic-fixes
head:   cdfde8f61a004fa5797d40581077603c142adca1
commit: cdfde8f61a004fa5797d40581077603c142adca1 [1/1] asm-generic: correct reference to GENERIC_LIB_DEVMEM_IS_ALLOWED
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220708/202207080744.tSGEdxng-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
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/arnd/asm-generic.git/commit/?id=cdfde8f61a004fa5797d40581077603c142adca1
        git remote add arnd-asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
        git fetch --no-tags arnd-asm-generic asm-generic-fixes
        git checkout cdfde8f61a004fa5797d40581077603c142adca1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/ kernel//

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

All errors (new ones prefixed by >>):

   drivers/char/mem.c: In function 'page_is_allowed':
>> drivers/char/mem.c:66:16: error: implicit declaration of function 'devmem_is_allowed'; did you mean 'page_is_allowed'? [-Werror=implicit-function-declaration]
      66 |         return devmem_is_allowed(pfn);
         |                ^~~~~~~~~~~~~~~~~
         |                page_is_allowed
   cc1: some warnings being treated as errors


vim +66 drivers/char/mem.c

^1da177e4c3f415 Linus Torvalds   2005-04-16  62  
d092633bff3b19f Ingo Molnar      2008-07-18  63  #ifdef CONFIG_STRICT_DEVMEM
a4866aa812518ed Kees Cook        2017-04-05  64  static inline int page_is_allowed(unsigned long pfn)
a4866aa812518ed Kees Cook        2017-04-05  65  {
a4866aa812518ed Kees Cook        2017-04-05 @66  	return devmem_is_allowed(pfn);
a4866aa812518ed Kees Cook        2017-04-05  67  }
e2beb3eae627211 Venki Pallipadi  2008-03-06  68  static inline int range_is_allowed(unsigned long pfn, unsigned long size)
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  69  {
e2beb3eae627211 Venki Pallipadi  2008-03-06  70  	u64 from = ((u64)pfn) << PAGE_SHIFT;
e2beb3eae627211 Venki Pallipadi  2008-03-06  71  	u64 to = from + size;
e2beb3eae627211 Venki Pallipadi  2008-03-06  72  	u64 cursor = from;
e2beb3eae627211 Venki Pallipadi  2008-03-06  73  
e2beb3eae627211 Venki Pallipadi  2008-03-06  74  	while (cursor < to) {
39380b80d727232 Jiri Kosina      2016-07-08  75  		if (!devmem_is_allowed(pfn))
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  76  			return 0;
e2beb3eae627211 Venki Pallipadi  2008-03-06  77  		cursor += PAGE_SIZE;
e2beb3eae627211 Venki Pallipadi  2008-03-06  78  		pfn++;
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  79  	}
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  80  	return 1;
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  81  }
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  82  #else
a4866aa812518ed Kees Cook        2017-04-05  83  static inline int page_is_allowed(unsigned long pfn)
a4866aa812518ed Kees Cook        2017-04-05  84  {
a4866aa812518ed Kees Cook        2017-04-05  85  	return 1;
a4866aa812518ed Kees Cook        2017-04-05  86  }
e2beb3eae627211 Venki Pallipadi  2008-03-06  87  static inline int range_is_allowed(unsigned long pfn, unsigned long size)
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  88  {
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  89  	return 1;
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  90  }
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  91  #endif
ae531c26c5c2a28 Arjan van de Ven 2008-04-24  92  

:::::: The code at line 66 was first introduced by commit
:::::: a4866aa812518ed1a37d8ea0c881dc946409de94 mm: Tighten x86 /dev/mem with zeroing reads

:::::: TO: Kees Cook <keescook@xxxxxxxxxxxx>
:::::: CC: Kees Cook <keescook@xxxxxxxxxxxx>

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



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux