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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 28 Oct 2021 12:35:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [frederic-dynticks:isolation/split 9/13]
 include/linux/cpumask.h:610:26: error: passing argument 1 of
 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target
 type

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git isolation/split
head:   c4988a7256e9e02fb2503a7a0e748ab7b50667b6
commit: 8ea31dca120d4d746a70867c26ca97bb9f4b0471 [9/13] rcu/nocb: Pass a cpumask instead of a single CPU to offload/deoffload
config: openrisc-buildonly-randconfig-r001-20211027 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git/commit/?id=8ea31dca120d4d746a70867c26ca97bb9f4b0471
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks isolation/split
        git checkout 8ea31dca120d4d746a70867c26ca97bb9f4b0471
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   kernel/rcu/rcutorture.c: In function 'rcu_nocb_toggle':
>> include/linux/cpumask.h:610:26: error: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
     610 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1718:49: note: in expansion of macro 'cpumask_of'
    1718 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), true);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:10,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:119:59: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     119 | static inline int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload)
         |                                           ~~~~~~~~~~~~~~~~^~~~~~~
   In file included from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
>> include/linux/cpumask.h:610:26: error: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
     610 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1721:49: note: in expansion of macro 'cpumask_of'
    1721 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), false);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:10,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:119:59: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     119 | static inline int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload)
         |                                           ~~~~~~~~~~~~~~~~^~~~~~~
   cc1: all warnings being treated as errors


vim +610 include/linux/cpumask.h

2d3854a37e8b76 Rusty Russell 2008-11-05  605  
cd83e42c6b0413 Rusty Russell 2008-11-07  606  /**
cd83e42c6b0413 Rusty Russell 2008-11-07  607   * cpumask_of - the cpumask containing just a given cpu
cd83e42c6b0413 Rusty Russell 2008-11-07  608   * @cpu: the cpu (<= nr_cpu_ids)
cd83e42c6b0413 Rusty Russell 2008-11-07  609   */
cd83e42c6b0413 Rusty Russell 2008-11-07 @610  #define cpumask_of(cpu) (get_cpu_mask(cpu))
cd83e42c6b0413 Rusty Russell 2008-11-07  611  

:::::: The code at line 610 was first introduced by commit
:::::: cd83e42c6b0413dcbb548c2ead799111ff7e6a13 cpumask: new API, v2

:::::: TO: Rusty Russell <rusty@...tcorp.com.au>
:::::: CC: Ingo Molnar <mingo@...e.hu>

---
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" (32666 bytes)

Powered by blists - more mailing lists