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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202401042241.EQntOcPK-lkp@intel.com>
Date: Thu, 4 Jan 2024 22:54:30 +0800
From: kernel test robot <lkp@...el.com>
To: Pierre Gondois <pierre.gondois@....com>, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Pierre Gondois <pierre.gondois@....com>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Daniel Bristot de Oliveira <bristot@...hat.com>,
	Valentin Schneider <vschneid@...hat.com>
Subject: Re: [PATCH 1/2] sched/topology: Annotate RCU pointers properly

Hi Pierre,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on tip/master peterz-queue/sched/core tip/auto-latest linus/master v6.7-rc8 next-20240104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pierre-Gondois/sched-topology-Annotate-RCU-pointers-properly/20240103-210154
base:   tip/sched/core
patch link:    https://lore.kernel.org/r/20240103125648.194516-2-pierre.gondois%40arm.com
patch subject: [PATCH 1/2] sched/topology: Annotate RCU pointers properly
config: arm64-randconfig-r111-20240104 (https://download.01.org/0day-ci/archive/20240104/202401042241.EQntOcPK-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240104/202401042241.EQntOcPK-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401042241.EQntOcPK-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/build_utility.c: note: in included file:
   kernel/sched/topology.c:485:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct perf_domain *pd @@     got struct perf_domain [noderef] __rcu *pd @@
   kernel/sched/topology.c:485:19: sparse:     expected struct perf_domain *pd
   kernel/sched/topology.c:485:19: sparse:     got struct perf_domain [noderef] __rcu *pd
   kernel/sched/topology.c:647:49: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct sched_domain *parent @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:647:49: sparse:     expected struct sched_domain *parent
   kernel/sched/topology.c:647:49: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:732:50: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct sched_domain *parent @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:732:50: sparse:     expected struct sched_domain *parent
   kernel/sched/topology.c:732:50: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:740:55: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain [noderef] __rcu *[noderef] __rcu child @@     got struct sched_domain *[assigned] tmp @@
   kernel/sched/topology.c:740:55: sparse:     expected struct sched_domain [noderef] __rcu *[noderef] __rcu child
   kernel/sched/topology.c:740:55: sparse:     got struct sched_domain *[assigned] tmp
   kernel/sched/topology.c:753:29: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] tmp @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:753:29: sparse:     expected struct sched_domain *[assigned] tmp
   kernel/sched/topology.c:753:29: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:758:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:758:20: sparse:     expected struct sched_domain *sd
   kernel/sched/topology.c:758:20: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:779:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] tmp @@     got struct sched_domain [noderef] __rcu *sd @@
   kernel/sched/topology.c:779:13: sparse:     expected struct sched_domain *[assigned] tmp
   kernel/sched/topology.c:779:13: sparse:     got struct sched_domain [noderef] __rcu *sd
   kernel/sched/topology.c:941:70: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_domain *sd @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:941:70: sparse:     expected struct sched_domain *sd
   kernel/sched/topology.c:941:70: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:970:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_domain *sd @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:970:59: sparse:     expected struct sched_domain *sd
   kernel/sched/topology.c:970:59: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1016:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_domain *sd @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:1016:57: sparse:     expected struct sched_domain *sd
   kernel/sched/topology.c:1016:57: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1018:25: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *sibling @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:1018:25: sparse:     expected struct sched_domain *sibling
   kernel/sched/topology.c:1018:25: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1026:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_domain *sd @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:1026:55: sparse:     expected struct sched_domain *sd
   kernel/sched/topology.c:1026:55: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1028:25: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *sibling @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:1028:25: sparse:     expected struct sched_domain *sibling
   kernel/sched/topology.c:1028:25: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1098:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_domain *sd @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:1098:62: sparse:     expected struct sched_domain *sd
   kernel/sched/topology.c:1098:62: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1202:40: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct sched_domain *child @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:1202:40: sparse:     expected struct sched_domain *child
   kernel/sched/topology.c:1202:40: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1622:43: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct sched_domain [noderef] __rcu *child @@     got struct sched_domain *child @@
   kernel/sched/topology.c:1622:43: sparse:     expected struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:1622:43: sparse:     got struct sched_domain *child
>> kernel/sched/topology.c:1998:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int *distances @@     got int [noderef] __rcu *static [addressable] [assigned] [toplevel] sched_domains_numa_distance @@
   kernel/sched/topology.c:1998:19: sparse:     expected int *distances
   kernel/sched/topology.c:1998:19: sparse:     got int [noderef] __rcu *static [addressable] [assigned] [toplevel] sched_domains_numa_distance
>> kernel/sched/topology.c:2000:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cpumask ***masks @@     got struct cpumask **[noderef] __rcu *static [addressable] [assigned] [toplevel] sched_domains_numa_masks @@
   kernel/sched/topology.c:2000:15: sparse:     expected struct cpumask ***masks
   kernel/sched/topology.c:2000:15: sparse:     got struct cpumask **[noderef] __rcu *static [addressable] [assigned] [toplevel] sched_domains_numa_masks
   kernel/sched/topology.c:2321:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain [noderef] __rcu *parent @@     got struct sched_domain *sd @@
   kernel/sched/topology.c:2321:31: sparse:     expected struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:2321:31: sparse:     got struct sched_domain *sd
   kernel/sched/topology.c:2425:57: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:2425:57: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/topology.c:2425:57: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:2446:56: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct sched_domain *child @@     got struct sched_domain [noderef] __rcu *child @@
   kernel/sched/topology.c:2446:56: sparse:     expected struct sched_domain *child
   kernel/sched/topology.c:2446:56: sparse:     got struct sched_domain [noderef] __rcu *child
   kernel/sched/topology.c:2445:57: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:2445:57: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/topology.c:2445:57: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/topology.c:2500:57: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/topology.c:2500:57: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/topology.c:2500:57: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/build_utility.c: note: in included file (through include/linux/smp.h, include/linux/sched/clock.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   kernel/sched/build_utility.c: note: in included file:
   kernel/sched/sched.h:1846:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/sched.h:1846:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/sched.h:1846:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/sched.h:1867:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/sched.h:1867:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/sched.h:1867:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/sched.h:1867:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/sched.h:1867:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/sched.h:1867:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/sched.h:1846:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/sched.h:1846:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/sched.h:1846:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/sched.h:1867:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/sched.h:1867:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/sched.h:1867:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/build_utility.c: note: in included file:
   kernel/sched/topology.c:741:39: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:971:31: sparse: sparse: dereference of noderef expression
   kernel/sched/build_utility.c: note: in included file (through include/linux/smp.h, include/linux/sched/clock.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   kernel/sched/build_utility.c: note: in included file:
   kernel/sched/topology.c:1643:19: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:1658:48: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:1723:40: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:1934:86: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:1983:9: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2053:82: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2054:78: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2054:78: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2065:53: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2066:80: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2066:80: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2483:51: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2484:49: sparse: sparse: dereference of noderef expression
   kernel/sched/topology.c:2486:52: sparse: sparse: dereference of noderef expression
   kernel/sched/build_utility.c: note: in included file:
   kernel/sched/sched.h:1867:9: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/sched.h:1867:9: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/sched.h:1867:9: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/build_utility.c: note: in included file:
   kernel/sched/core_sched.c:94:23: sparse: sparse: context imbalance in 'sched_core_update_cookie' - wrong count at exit

vim +1998 kernel/sched/topology.c

0083242c93759d Valentin Schneider 2021-08-18  1987  
0083242c93759d Valentin Schneider 2021-08-18  1988  
0fb3978b0aac3a Huang Ying         2022-02-14  1989  static void sched_reset_numa(void)
0fb3978b0aac3a Huang Ying         2022-02-14  1990  {
0fb3978b0aac3a Huang Ying         2022-02-14  1991  	int nr_levels, *distances;
0fb3978b0aac3a Huang Ying         2022-02-14  1992  	struct cpumask ***masks;
0083242c93759d Valentin Schneider 2021-08-18  1993  
0fb3978b0aac3a Huang Ying         2022-02-14  1994  	nr_levels = sched_domains_numa_levels;
0fb3978b0aac3a Huang Ying         2022-02-14  1995  	sched_domains_numa_levels = 0;
0fb3978b0aac3a Huang Ying         2022-02-14  1996  	sched_max_numa_distance = 0;
0fb3978b0aac3a Huang Ying         2022-02-14  1997  	sched_numa_topology_type = NUMA_DIRECT;
0fb3978b0aac3a Huang Ying         2022-02-14 @1998  	distances = sched_domains_numa_distance;
0fb3978b0aac3a Huang Ying         2022-02-14  1999  	rcu_assign_pointer(sched_domains_numa_distance, NULL);
0fb3978b0aac3a Huang Ying         2022-02-14 @2000  	masks = sched_domains_numa_masks;
0fb3978b0aac3a Huang Ying         2022-02-14  2001  	rcu_assign_pointer(sched_domains_numa_masks, NULL);
0fb3978b0aac3a Huang Ying         2022-02-14  2002  	if (distances || masks) {
0fb3978b0aac3a Huang Ying         2022-02-14  2003  		int i, j;
0083242c93759d Valentin Schneider 2021-08-18  2004  
0fb3978b0aac3a Huang Ying         2022-02-14  2005  		synchronize_rcu();
0fb3978b0aac3a Huang Ying         2022-02-14  2006  		kfree(distances);
0fb3978b0aac3a Huang Ying         2022-02-14  2007  		for (i = 0; i < nr_levels && masks; i++) {
0fb3978b0aac3a Huang Ying         2022-02-14  2008  			if (!masks[i])
0083242c93759d Valentin Schneider 2021-08-18  2009  				continue;
0fb3978b0aac3a Huang Ying         2022-02-14  2010  			for_each_node(j)
0fb3978b0aac3a Huang Ying         2022-02-14  2011  				kfree(masks[i][j]);
0fb3978b0aac3a Huang Ying         2022-02-14  2012  			kfree(masks[i]);
0fb3978b0aac3a Huang Ying         2022-02-14  2013  		}
0fb3978b0aac3a Huang Ying         2022-02-14  2014  		kfree(masks);
0fb3978b0aac3a Huang Ying         2022-02-14  2015  	}
0fb3978b0aac3a Huang Ying         2022-02-14  2016  	if (sched_domain_topology_saved) {
0fb3978b0aac3a Huang Ying         2022-02-14  2017  		kfree(sched_domain_topology);
0fb3978b0aac3a Huang Ying         2022-02-14  2018  		sched_domain_topology = sched_domain_topology_saved;
0fb3978b0aac3a Huang Ying         2022-02-14  2019  		sched_domain_topology_saved = NULL;
0083242c93759d Valentin Schneider 2021-08-18  2020  	}
0083242c93759d Valentin Schneider 2021-08-18  2021  }
0083242c93759d Valentin Schneider 2021-08-18  2022  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ