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:   Sat, 8 Aug 2020 04:11:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Chao Yu <yuchao0@...wei.com>, Chao Yu <chao@...nel.org>
Subject: drivers/gpu/drm/i915/intel_uncore.c:2009
 __intel_wait_for_register_fw() error: uninitialized symbol 'reg_value'.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5631c5e0eb9035d92ceb20fcd9cdb7779a3f5cc7
commit: 3f649ab728cda8038259d8f14492fe400fbab911 treewide: Remove uninitialized_var() usage
date:   3 weeks ago
config: i386-randconfig-m021-20200807 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

New smatch warnings:
drivers/gpu/drm/i915/intel_uncore.c:2009 __intel_wait_for_register_fw() error: uninitialized symbol 'reg_value'.
drivers/gpu/drm/i915/gt/intel_lrc.c:1134 __unwind_incomplete_requests() error: uninitialized symbol 'pl'.

Old smatch warnings:
drivers/gpu/drm/i915/gt/intel_lrc.c:5668 intel_execlists_create_virtual() warn: assigning (-2) to unsigned variable 've->base.instance'
drivers/gpu/drm/i915/gt/intel_lrc.c:5669 intel_execlists_create_virtual() warn: assigning (-2) to unsigned variable 've->base.uabi_instance'

vim +/reg_value +2009 drivers/gpu/drm/i915/intel_uncore.c

907b28c56ea4062 Chris Wilson           2013-07-19  1959  
1758b90e38f53b9 Chris Wilson           2016-06-30  1960  /**
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1961   * __intel_wait_for_register_fw - wait until register matches expected state
d2d551c06f81775 Daniele Ceraolo Spurio 2019-03-25  1962   * @uncore: the struct intel_uncore
1758b90e38f53b9 Chris Wilson           2016-06-30  1963   * @reg: the register to read
1758b90e38f53b9 Chris Wilson           2016-06-30  1964   * @mask: mask to apply to register value
1758b90e38f53b9 Chris Wilson           2016-06-30  1965   * @value: expected value
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1966   * @fast_timeout_us: fast timeout in microsecond for atomic/tight wait
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1967   * @slow_timeout_ms: slow timeout in millisecond
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1968   * @out_value: optional placeholder to hold registry value
1758b90e38f53b9 Chris Wilson           2016-06-30  1969   *
1758b90e38f53b9 Chris Wilson           2016-06-30  1970   * This routine waits until the target register @reg contains the expected
3d466cd67e85fe1 Daniel Vetter          2016-07-15  1971   * @value after applying the @mask, i.e. it waits until ::
3d466cd67e85fe1 Daniel Vetter          2016-07-15  1972   *
3d466cd67e85fe1 Daniel Vetter          2016-07-15  1973   *     (I915_READ_FW(reg) & mask) == value
3d466cd67e85fe1 Daniel Vetter          2016-07-15  1974   *
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1975   * Otherwise, the wait will timeout after @slow_timeout_ms milliseconds.
6976e74b5fa1243 Michal Wajdeczko       2017-04-10  1976   * For atomic context @slow_timeout_ms must be zero and @fast_timeout_us
84d84cb7e20d3d2 Chris Wilson           2017-04-11  1977   * must be not larger than 20,0000 microseconds.
1758b90e38f53b9 Chris Wilson           2016-06-30  1978   *
1758b90e38f53b9 Chris Wilson           2016-06-30  1979   * Note that this routine assumes the caller holds forcewake asserted, it is
1758b90e38f53b9 Chris Wilson           2016-06-30  1980   * not suitable for very long waits. See intel_wait_for_register() if you
1758b90e38f53b9 Chris Wilson           2016-06-30  1981   * wish to wait without holding forcewake for the duration (i.e. you expect
1758b90e38f53b9 Chris Wilson           2016-06-30  1982   * the wait to be slow).
1758b90e38f53b9 Chris Wilson           2016-06-30  1983   *
e4661f144497f58 Michal Wajdeczko       2019-08-02  1984   * Return: 0 if the register matches the desired condition, or -ETIMEDOUT.
1758b90e38f53b9 Chris Wilson           2016-06-30  1985   */
d2d551c06f81775 Daniele Ceraolo Spurio 2019-03-25  1986  int __intel_wait_for_register_fw(struct intel_uncore *uncore,
1758b90e38f53b9 Chris Wilson           2016-06-30  1987  				 i915_reg_t reg,
3fc7d86b3268af9 Michal Wajdeczko       2017-04-10  1988  				 u32 mask,
3fc7d86b3268af9 Michal Wajdeczko       2017-04-10  1989  				 u32 value,
3fc7d86b3268af9 Michal Wajdeczko       2017-04-10  1990  				 unsigned int fast_timeout_us,
3fc7d86b3268af9 Michal Wajdeczko       2017-04-10  1991  				 unsigned int slow_timeout_ms,
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1992  				 u32 *out_value)
1758b90e38f53b9 Chris Wilson           2016-06-30  1993  {
3f649ab728cda80 Kees Cook              2020-06-03  1994  	u32 reg_value;
d2d551c06f81775 Daniele Ceraolo Spurio 2019-03-25  1995  #define done (((reg_value = intel_uncore_read_fw(uncore, reg)) & mask) == value)
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1996  	int ret;
1d1a9774e404141 Michal Wajdeczko       2017-04-07  1997  
6976e74b5fa1243 Michal Wajdeczko       2017-04-10  1998  	/* Catch any overuse of this function */
84d84cb7e20d3d2 Chris Wilson           2017-04-11  1999  	might_sleep_if(slow_timeout_ms);
84d84cb7e20d3d2 Chris Wilson           2017-04-11  2000  	GEM_BUG_ON(fast_timeout_us > 20000);
6976e74b5fa1243 Michal Wajdeczko       2017-04-10  2001  
84d84cb7e20d3d2 Chris Wilson           2017-04-11  2002  	ret = -ETIMEDOUT;
84d84cb7e20d3d2 Chris Wilson           2017-04-11  2003  	if (fast_timeout_us && fast_timeout_us <= 20000)
1d1a9774e404141 Michal Wajdeczko       2017-04-07  2004  		ret = _wait_for_atomic(done, fast_timeout_us, 0);
ff26ffa8ee267dc Daniel Vetter          2017-05-10  2005  	if (ret && slow_timeout_ms)
1d1a9774e404141 Michal Wajdeczko       2017-04-07  2006  		ret = wait_for(done, slow_timeout_ms);
84d84cb7e20d3d2 Chris Wilson           2017-04-11  2007  
1d1a9774e404141 Michal Wajdeczko       2017-04-07  2008  	if (out_value)
1d1a9774e404141 Michal Wajdeczko       2017-04-07 @2009  		*out_value = reg_value;
84d84cb7e20d3d2 Chris Wilson           2017-04-11  2010  
1758b90e38f53b9 Chris Wilson           2016-06-30  2011  	return ret;
1758b90e38f53b9 Chris Wilson           2016-06-30  2012  #undef done
1758b90e38f53b9 Chris Wilson           2016-06-30  2013  }
1758b90e38f53b9 Chris Wilson           2016-06-30  2014  

:::::: The code at line 2009 was first introduced by commit
:::::: 1d1a9774e40414148ecebbdb713746bfb6f9a561 drm/i915: Extend intel_wait_for_register_fw() with fast timeout

:::::: TO: Michal Wajdeczko <michal.wajdeczko@...el.com>
:::::: CC: Chris Wilson <chris@...is-wilson.co.uk>

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

Powered by blists - more mailing lists