Hi Igor,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180223]
[cannot apply to linus/master mmotm/master char-misc/char-misc-testing 
v4.16-rc3 v4.16-rc2 v4.16-rc1 v4.16-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Igor-Stoppa/mm-security-ro-protection-for-dynamic-data/20180302-232215
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   mm/test_pmalloc.c: In function 'test_pmalloc':
>> mm/test_pmalloc.c:52:14: error: implicit declaration of function 'vmalloc'; 
>> did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
     var_vmall = vmalloc(SIZE_2);
                 ^~~~~~~
                 kvmalloc
   mm/test_pmalloc.c:52:12: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
     var_vmall = vmalloc(SIZE_2);
               ^
>> mm/test_pmalloc.c:64:2: error: implicit declaration of function 'vfree'; did 
>> you mean 'kvfree'? [-Werror=implicit-function-declaration]
     vfree(var_vmall);
     ^~~~~
     kvfree
   cc1: some warnings being treated as errors

vim +52 mm/test_pmalloc.c

    27  
    28  #define is_alloc_ok(variable, size)     \
    29          validate_alloc(true, variable, size)
    30  
    31  #define is_alloc_no(variable, size)     \
    32          validate_alloc(false, variable, size)
    33  
    34  void test_pmalloc(void)
    35  {
    36          struct gen_pool *pool_unprot;
    37          struct gen_pool *pool_prot;
    38          void *var_prot, *var_unprot, *var_vmall;
    39  
    40          pr_notice("pmalloc-selftest");
    41          pool_unprot = pmalloc_create_pool("unprotected", 0);
    42          if (unlikely(!pool_unprot))
    43                  goto error;
    44          pool_prot = pmalloc_create_pool("protected", 0);
    45          if (unlikely(!(pool_prot)))
    46                  goto error_release;
    47  
    48          pr_notice("Testing allocation capability");
    49          var_unprot = pmalloc(pool_unprot,  SIZE_1 - 1, GFP_KERNEL);
    50          var_prot = pmalloc(pool_prot,  SIZE_1, GFP_KERNEL);
    51          *(int *)var_prot = 0;
  > 52          var_vmall = vmalloc(SIZE_2);
    53  
    54  
    55          pr_notice("Test correctness of is_pmalloc_object()");
    56          WARN_ON(unlikely(!is_alloc_ok(var_unprot, 10)));
    57          WARN_ON(unlikely(!is_alloc_ok(var_unprot, SIZE_1)));
    58          WARN_ON(unlikely(!is_alloc_ok(var_unprot, PAGE_SIZE)));
    59          WARN_ON(unlikely(!is_alloc_no(var_unprot, SIZE_1 + 1)));
    60          WARN_ON(unlikely(!is_alloc_no(var_vmall, 10)));
    61  
    62  
    63          pfree(pool_unprot, var_unprot);
  > 64          vfree(var_vmall);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to