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: <202111260248.R4wPhIDu-lkp@intel.com>
Date:   Fri, 26 Nov 2021 02:22:46 +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,
        André Almeida <andrealmeid@...labora.com>
Subject: kernel/futex/syscalls.c:29:1: sparse: sparse: Using plain integer as
 NULL pointer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f53fa508db098c9d372423a6dac31c8a5679cdf
commit: af8cc9600bbf2251b04c56139f7c83f87c3f878a futex: Split out syscalls
date:   7 weeks ago
config: s390-randconfig-s031-20211116 (https://download.01.org/0day-ci/archive/20211126/202111260248.R4wPhIDu-lkp@intel.com/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/torvalds/linux.git/commit/?id=af8cc9600bbf2251b04c56139f7c83f87c3f878a
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout af8cc9600bbf2251b04c56139f7c83f87c3f878a
        # save the config file 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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ