Re: [PATCH v9] mm: Optional full ASLR for mmap(), mremap(), vdso, stack and heap

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

 



Hi Topi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 2c85ebc57b3e1817b6ce1a6b703928e113a90442]

url:    https://github.com/0day-ci/linux/commits/Topi-Miettinen/mm-Optional-full-ASLR-for-mmap-mremap-vdso-stack-and-heap/20210104-235438
base:    2c85ebc57b3e1817b6ce1a6b703928e113a90442
config: powerpc-randconfig-s032-20210105 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-184-g1b896707-dirty
        # https://github.com/0day-ci/linux/commit/d65e085d04e2aace153b42d29d44f3711481c9ad
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Topi-Miettinen/mm-Optional-full-ASLR-for-mmap-mremap-vdso-stack-and-heap/20210104-235438
        git checkout d65e085d04e2aace153b42d29d44f3711481c9ad
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/mman.h:5,
                    from arch/powerpc/kernel/asm-offsets.c:21:
   include/linux/mm.h: In function 'can_randomize_full':
>> include/linux/mm.h:2995:35: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function); did you mean 'KERN_RANDOMIZE'?
    2995 |  return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
         |                                   ^~~~~~~~~~~~~~~~~
         |                                   KERN_RANDOMIZE
   include/linux/mm.h:2995:35: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/mm.h:2995:55: error: 'ADDR_COMPAT_LAYOUT' undeclared (first use in this function)
    2995 |  return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
         |                                                       ^~~~~~~~~~~~~~~~~~
>> include/linux/mm.h:2996:9: error: 'ADDR_LIMIT_32BIT' undeclared (first use in this function)
    2996 |       | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
         |         ^~~~~~~~~~~~~~~~
>> include/linux/mm.h:2996:28: error: 'ADDR_LIMIT_3GB' undeclared (first use in this function)
    2996 |       | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
         |                            ^~~~~~~~~~~~~~
>> include/linux/mm.h:2997:36: error: implicit declaration of function 'in_32bit_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
    2997 |   && !(IS_ENABLED(CONFIG_64BIT) && in_32bit_syscall())
         |                                    ^~~~~~~~~~~~~~~~
         |                                    in_compat_syscall
   cc1: some warnings being treated as errors
--
   In file included from include/linux/mman.h:5,
                    from arch/powerpc/kernel/asm-offsets.c:21:
   include/linux/mm.h: In function 'can_randomize_full':
>> include/linux/mm.h:2995:35: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function); did you mean 'KERN_RANDOMIZE'?
    2995 |  return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
         |                                   ^~~~~~~~~~~~~~~~~
         |                                   KERN_RANDOMIZE
   include/linux/mm.h:2995:35: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/mm.h:2995:55: error: 'ADDR_COMPAT_LAYOUT' undeclared (first use in this function)
    2995 |  return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
         |                                                       ^~~~~~~~~~~~~~~~~~
>> include/linux/mm.h:2996:9: error: 'ADDR_LIMIT_32BIT' undeclared (first use in this function)
    2996 |       | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
         |         ^~~~~~~~~~~~~~~~
>> include/linux/mm.h:2996:28: error: 'ADDR_LIMIT_3GB' undeclared (first use in this function)
    2996 |       | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
         |                            ^~~~~~~~~~~~~~
>> include/linux/mm.h:2997:36: error: implicit declaration of function 'in_32bit_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
    2997 |   && !(IS_ENABLED(CONFIG_64BIT) && in_32bit_syscall())
         |                                    ^~~~~~~~~~~~~~~~
         |                                    in_compat_syscall
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/powerpc/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
   scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
   scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
   In file included from include/linux/mman.h:5,
                    from arch/powerpc/kernel/asm-offsets.c:21:
   include/linux/mm.h: In function 'can_randomize_full':
>> include/linux/mm.h:2995:35: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function); did you mean 'KERN_RANDOMIZE'?
    2995 |  return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
         |                                   ^~~~~~~~~~~~~~~~~
         |                                   KERN_RANDOMIZE
   include/linux/mm.h:2995:35: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/mm.h:2995:55: error: 'ADDR_COMPAT_LAYOUT' undeclared (first use in this function)
    2995 |  return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
         |                                                       ^~~~~~~~~~~~~~~~~~
>> include/linux/mm.h:2996:9: error: 'ADDR_LIMIT_32BIT' undeclared (first use in this function)
    2996 |       | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
         |         ^~~~~~~~~~~~~~~~
>> include/linux/mm.h:2996:28: error: 'ADDR_LIMIT_3GB' undeclared (first use in this function)
    2996 |       | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
         |                            ^~~~~~~~~~~~~~
>> include/linux/mm.h:2997:36: error: implicit declaration of function 'in_32bit_syscall'; did you mean 'in_compat_syscall'? [-Werror=implicit-function-declaration]
    2997 |   && !(IS_ENABLED(CONFIG_64BIT) && in_32bit_syscall())
         |                                    ^~~~~~~~~~~~~~~~
         |                                    in_compat_syscall
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/powerpc/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +2995 include/linux/mm.h

  2986	
  2987	#ifndef CONFIG_MMU
  2988	#define randomize_va_space 0
  2989	static inline bool can_randomize_full(void) { return false; }
  2990	#else
  2991	extern int randomize_va_space;
  2992	static inline bool can_randomize_full(void)
  2993	{
  2994		/* Don't randomize 32 bit applications */
> 2995		return !(current->personality & (ADDR_NO_RANDOMIZE | ADDR_COMPAT_LAYOUT
> 2996						 | ADDR_LIMIT_32BIT | ADDR_LIMIT_3GB))
> 2997			&& !(IS_ENABLED(CONFIG_64BIT) && in_32bit_syscall())
  2998			&& randomize_va_space == 3;
  2999	}
  3000	#endif
  3001	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux