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: <202202242127.wh8nEbxG-lkp@intel.com>
Date:   Thu, 24 Feb 2022 21:27:46 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [kees:for-next/overflow 5/7] lib/stackinit_kunit.c:440:1: sparse:
 sparse: Using plain integer as NULL pointer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/overflow
head:   2ee9b438ef95e4d1a41fba18fd837d1cea67d4a8
commit: 29b768fc54fe40d97b8aef390ab9dc4ec74cf773 [5/7] lib: stackinit: Convert to KUnit
config: arm-randconfig-s031-20220223 (https://download.01.org/0day-ci/archive/20220224/202202242127.wh8nEbxG-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=29b768fc54fe40d97b8aef390ab9dc4ec74cf773
        git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
        git fetch --no-tags kees for-next/overflow
        git checkout 29b768fc54fe40d97b8aef390ab9dc4ec74cf773
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> lib/stackinit_kunit.c:440:1: sparse: sparse: Using plain integer as NULL pointer
>> lib/stackinit_kunit.c:440:1: sparse: sparse: Using plain integer as NULL pointer
>> lib/stackinit_kunit.c:440:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:442:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:443:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:443:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:443:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:443:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:443:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:443:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:444:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:445:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:446:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:446:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:446:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:446:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:446:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:446:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:447:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:447:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:447:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:450:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:450:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:450:1: sparse: sparse: Using plain integer as NULL pointer
   lib/stackinit_kunit.c:452:1: sparse: sparse: Using plain integer as NULL pointer

vim +440 lib/stackinit_kunit.c

50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  408  
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  409  #define DEFINE_SCALAR_TEST(name, init, xfail)			\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  410  		DEFINE_TEST(name ## _ ## init, name, SCALAR,	\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  411  			    init, xfail)
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  412  
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  413  #define DEFINE_SCALAR_TESTS(init, xfail)			\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  414  		DEFINE_SCALAR_TEST(u8, init, xfail);		\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  415  		DEFINE_SCALAR_TEST(u16, init, xfail);		\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  416  		DEFINE_SCALAR_TEST(u32, init, xfail);		\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  417  		DEFINE_SCALAR_TEST(u64, init, xfail);		\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  418  		DEFINE_TEST(char_array_ ## init, unsigned char,	\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  419  			    STRING, init, xfail)
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  420  
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  421  #define DEFINE_STRUCT_TEST(name, init, xfail)			\
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  422  		DEFINE_TEST(name ## _ ## init,			\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  423  			    struct test_ ## name, STRUCT, init, \
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  424  			    xfail)
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  425  
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  426  #define DEFINE_STRUCT_TESTS(init, xfail)			\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  427  		DEFINE_STRUCT_TEST(small_hole, init, xfail);	\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  428  		DEFINE_STRUCT_TEST(big_hole, init, xfail);	\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  429  		DEFINE_STRUCT_TEST(trailing_hole, init, xfail);	\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  430  		DEFINE_STRUCT_TEST(packed, init, xfail)
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  431  
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  432  #define DEFINE_STRUCT_INITIALIZER_TESTS(base)			\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  433  		DEFINE_STRUCT_TESTS(base ## _ ## partial,	\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  434  				    WANT_SUCCESS);		\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  435  		DEFINE_STRUCT_TESTS(base ## _ ## all,		\
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  436  				    WANT_SUCCESS)
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  437  
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  438  /* These should be fully initialized all the time! */
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  439  DEFINE_SCALAR_TESTS(zero, WANT_SUCCESS);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23 @440  DEFINE_STRUCT_TESTS(zero, WANT_SUCCESS);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  441  /* Struct initializers: padding may be left uninitialized. */
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  442  DEFINE_STRUCT_INITIALIZER_TESTS(static);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  443  DEFINE_STRUCT_INITIALIZER_TESTS(dynamic);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  444  DEFINE_STRUCT_INITIALIZER_TESTS(runtime);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  445  DEFINE_STRUCT_INITIALIZER_TESTS(assigned_static);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  446  DEFINE_STRUCT_INITIALIZER_TESTS(assigned_dynamic);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  447  DEFINE_STRUCT_TESTS(assigned_copy, XFAIL);
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  448  /* No initialization without compiler instrumentation. */
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  449  DEFINE_SCALAR_TESTS(none, WANT_SUCCESS);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  450  DEFINE_STRUCT_TESTS(none, WANT_SUCCESS);
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  451  /* Initialization of members with __user attribute. */
a8fc576d4af2f2 lib/test_stackinit.c Kees Cook 2021-07-23  452  DEFINE_TEST(user, struct test_user, STRUCT, none, WANT_SUCCESS);
50ceaa95ea0970 lib/test_stackinit.c Kees Cook 2019-01-23  453  

:::::: The code at line 440 was first introduced by commit
:::::: a8fc576d4af2f23a87a586424252df97f0ad0b06 lib/test_stackinit: Add assigned initializers

:::::: TO: Kees Cook <keescook@...omium.org>
:::::: CC: Kees Cook <keescook@...omium.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ