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: <202111012352.4NSZK1Gl-lkp@intel.com>
Date:   Mon, 1 Nov 2021 23:14:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        x86@...nel.org,
        André Almeida <andrealmeid@...labora.com>
Subject: [tip:locking/core 19/45] kernel/futex/syscalls.c:29:1: sparse:
 sparse: Using plain integer as NULL pointer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head:   f98a3dccfcb0b9b9c3bef8df9edd61cda80ad937
commit: af8cc9600bbf2251b04c56139f7c83f87c3f878a [19/45] futex: Split out syscalls
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-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/tip/tip.git/commit/?id=af8cc9600bbf2251b04c56139f7c83f87c3f878a
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip locking/core
        git checkout af8cc9600bbf2251b04c56139f7c83f87c3f878a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash kernel/futex/

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 >>)
>> kernel/futex/syscalls.c:29:1: sparse: sparse: Using plain integer as NULL pointer
>> kernel/futex/syscalls.c:29:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:51:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:180:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:203:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:203:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:218:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer
   kernel/futex/syscalls.c:259:1: sparse: sparse: Using plain integer as NULL pointer

vim +29 kernel/futex/syscalls.c

     8	
     9	/*
    10	 * Support for robust futexes: the kernel cleans up held futexes at
    11	 * thread exit time.
    12	 *
    13	 * Implementation: user-space maintains a per-thread list of locks it
    14	 * is holding. Upon do_exit(), the kernel carefully walks this list,
    15	 * and marks all locks that are owned by this thread with the
    16	 * FUTEX_OWNER_DIED bit, and wakes up a waiter (if any). The list is
    17	 * always manipulated with the lock held, so the list is private and
    18	 * per-thread. Userspace also maintains a per-thread 'list_op_pending'
    19	 * field, to allow the kernel to clean up if the thread dies after
    20	 * acquiring the lock, but just before it could have added itself to
    21	 * the list. There can only be one such pending lock.
    22	 */
    23	
    24	/**
    25	 * sys_set_robust_list() - Set the robust-futex list head of a task
    26	 * @head:	pointer to the list-head
    27	 * @len:	length of the list-head, as userspace expects
    28	 */
  > 29	SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head,
    30			size_t, len)
    31	{
    32		if (!futex_cmpxchg_enabled)
    33			return -ENOSYS;
    34		/*
    35		 * The kernel knows only one size for now:
    36		 */
    37		if (unlikely(len != sizeof(*head)))
    38			return -EINVAL;
    39	
    40		current->robust_list = head;
    41	
    42		return 0;
    43	}
    44	

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

Download attachment ".config.gz" of type "application/gzip" (67561 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ