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: <202205260631.a3Mk6u8a-lkp@intel.com>
Date:   Thu, 26 May 2022 06:53:14 +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:cpuset/nocb 1/4] include/linux/cpumask.h:636:26:
 warning: 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 cpuset/nocb
head:   ad895c0b6a5e3c41d46f184900d193e70bfc90d3
commit: 25db09cc1131b612d5dbb474ea1640b90b2518ca [1/4] rcu/nocb: Pass a cpumask instead of a single CPU to offload/deoffload
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220526/202205260631.a3Mk6u8a-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.3.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=25db09cc1131b612d5dbb474ea1640b90b2518ca
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks cpuset/nocb
        git checkout 25db09cc1131b612d5dbb474ea1640b90b2518ca
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/rcu/

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/smp.h:13,
                    from arch/mips/include/asm/cpu-type.h:12,
                    from arch/mips/include/asm/timex.h:19,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from kernel/rcu/rcutorture.c:18:
   kernel/rcu/rcutorture.c: In function 'rcu_nocb_toggle':
>> include/linux/cpumask.h:636:26: warning: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     636 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1890:49: note: in expansion of macro 'cpumask_of'
    1890 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), true);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:11,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:117:45: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     117 | int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload);
         |                             ~~~~~~~~~~~~~~~~^~~~~~~
   In file included from include/linux/smp.h:13,
                    from arch/mips/include/asm/cpu-type.h:12,
                    from arch/mips/include/asm/timex.h:19,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from kernel/rcu/rcutorture.c:18:
>> include/linux/cpumask.h:636:26: warning: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     636 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1893:49: note: in expansion of macro 'cpumask_of'
    1893 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), false);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:11,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:117:45: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     117 | int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload);
         |                             ~~~~~~~~~~~~~~~~^~~~~~~


vim +636 include/linux/cpumask.h

2d3854a37e8b767 Rusty Russell 2008-11-05  631  
cd83e42c6b0413d Rusty Russell 2008-11-07  632  /**
cd83e42c6b0413d Rusty Russell 2008-11-07  633   * cpumask_of - the cpumask containing just a given cpu
cd83e42c6b0413d Rusty Russell 2008-11-07  634   * @cpu: the cpu (<= nr_cpu_ids)
cd83e42c6b0413d Rusty Russell 2008-11-07  635   */
cd83e42c6b0413d Rusty Russell 2008-11-07 @636  #define cpumask_of(cpu) (get_cpu_mask(cpu))
cd83e42c6b0413d Rusty Russell 2008-11-07  637  

:::::: The code at line 636 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
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ