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: <202206071536.jNspPAFL-lkp@intel.com>
Date:   Tue, 7 Jun 2022 15:29:59 +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:rcu/context-tracking-v4 16/20]
 kernel/context_tracking.c:124:39: sparse: sparse: incorrect type in
 initializer (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git rcu/context-tracking-v4
head:   43ac8196f06d6abb21f28143f62d879546ad262c
commit: ab8851bd9c0f3773a18a2c950047d02ec908e03c [16/20] rcu/context-tracking: Move RCU-dynticks internal functions to context_tracking
config: x86_64-randconfig-s021 (https://download.01.org/0day-ci/archive/20220607/202206071536.jNspPAFL-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-18-g56afb504-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git/commit/?id=ab8851bd9c0f3773a18a2c950047d02ec908e03c
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks rcu/context-tracking-v4
        git checkout ab8851bd9c0f3773a18a2c950047d02ec908e03c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> kernel/context_tracking.c:124:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct context_tracking * @@
   kernel/context_tracking.c:124:39: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:124:39: sparse:     got struct context_tracking *
   kernel/context_tracking.c:163:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct context_tracking * @@
   kernel/context_tracking.c:163:39: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:163:39: sparse:     got struct context_tracking *
   kernel/context_tracking.c:204:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct context_tracking * @@
   kernel/context_tracking.c:204:39: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:204:39: sparse:     got struct context_tracking *
   kernel/context_tracking.c:259:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct context_tracking * @@
   kernel/context_tracking.c:259:39: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:259:39: sparse:     got struct context_tracking *
   kernel/context_tracking.c:490:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int * @@
   kernel/context_tracking.c:490:21: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:490:21: sparse:     got int *
   kernel/context_tracking.c:495:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int * @@
   kernel/context_tracking.c:495:9: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:495:9: sparse:     got int *
   kernel/context_tracking.c:524:14: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int enum ctx_state * @@
   kernel/context_tracking.c:524:14: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:524:14: sparse:     got int enum ctx_state *
   kernel/context_tracking.c:525:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got bool * @@
   kernel/context_tracking.c:525:21: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:525:21: sparse:     got bool *
   kernel/context_tracking.c:560:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int enum ctx_state * @@
   kernel/context_tracking.c:560:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:560:17: sparse:     got int enum ctx_state *
   kernel/context_tracking.c:624:13: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int enum ctx_state * @@
   kernel/context_tracking.c:624:13: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:624:13: sparse:     got int enum ctx_state *
   kernel/context_tracking.c:625:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got bool * @@
   kernel/context_tracking.c:625:21: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:625:21: sparse:     got bool *
   kernel/context_tracking.c:638:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int enum ctx_state * @@
   kernel/context_tracking.c:638:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:638:17: sparse:     got int enum ctx_state *
   kernel/context_tracking.c:681:14: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got bool * @@
   kernel/context_tracking.c:681:14: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:681:14: sparse:     got bool *
   kernel/context_tracking.c:682:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got bool * @@
   kernel/context_tracking.c:682:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:682:17: sparse:     got bool *
   kernel/context_tracking.c:502:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int * @@
   kernel/context_tracking.c:502:9: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:502:9: sparse:     got int *
   kernel/context_tracking.c:502:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got int * @@
   kernel/context_tracking.c:502:9: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/context_tracking.c:502:9: sparse:     got int *

vim +124 kernel/context_tracking.c

   113	
   114	/*
   115	 * Enter an RCU extended quiescent state, which can be either the
   116	 * idle loop or adaptive-tickless usermode execution.
   117	 *
   118	 * We crowbar the ->dynticks_nmi_nesting field to zero to allow for
   119	 * the possibility of usermode upcalls having messed up our count
   120	 * of interrupt nesting level during the prior busy period.
   121	 */
   122	static void noinstr rcu_eqs_enter(bool user)
   123	{
 > 124		struct context_tracking *ct = this_cpu_ptr(&context_tracking);
   125	
   126		WARN_ON_ONCE(ct_dynticks_nmi_nesting() != DYNTICK_IRQ_NONIDLE);
   127		WRITE_ONCE(ct->dynticks_nmi_nesting, 0);
   128		WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
   129			     ct_dynticks_nesting() == 0);
   130		if (ct_dynticks_nesting() != 1) {
   131			// RCU will still be watching, so just do accounting and leave.
   132			ct->dynticks_nesting--;
   133			return;
   134		}
   135	
   136		instrumentation_begin();
   137		lockdep_assert_irqs_disabled();
   138		trace_rcu_dyntick(TPS("Start"), ct_dynticks_nesting(), 0, ct_dynticks());
   139		WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current));
   140		rcu_preempt_deferred_qs(current);
   141	
   142		// instrumentation for the noinstr rcu_dynticks_eqs_enter()
   143		instrument_atomic_write(&ct->dynticks, sizeof(ct->dynticks));
   144	
   145		instrumentation_end();
   146		WRITE_ONCE(ct->dynticks_nesting, 0); /* Avoid irq-access tearing. */
   147		// RCU is watching here ...
   148		rcu_dynticks_eqs_enter();
   149		// ... but is no longer watching here.
   150		rcu_dynticks_task_enter();
   151	}
   152	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ