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: <202208170542.XpJ3DGlU-lkp@intel.com>
Date:   Thu, 18 Aug 2022 13:48:28 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Chao Peng <chao.p.peng@...ux.intel.com>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Isaku Yamahata <isaku.yamahata@...el.com>
Subject: [intel-tdx:kvm-upstream-workaround 150/308]
 arch/x86/kvm/mmu/mmu.c:7276 __mem_attr_is_mixed() error: uninitialized
 symbol 'entry'.

tree:   https://github.com/intel/tdx.git kvm-upstream-workaround
head:   85c097fdd1667a842a9e75d8f658fc16bd72981a
commit: a3b11dafa9058bdecc235b9c02aaae2d6b39c24d [150/308] KVM: Update lpage info when private/shared memory are mixed
config: x86_64-randconfig-m001-20220815 (https://download.01.org/0day-ci/archive/20220817/202208170542.XpJ3DGlU-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0

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

smatch warnings:
arch/x86/kvm/mmu/mmu.c:7276 __mem_attr_is_mixed() error: uninitialized symbol 'entry'.

vim +/entry +7276 arch/x86/kvm/mmu/mmu.c

a3b11dafa9058b Chao Peng 2022-07-20  7265  static bool __mem_attr_is_mixed(struct kvm *kvm, gfn_t start, gfn_t end)
a3b11dafa9058b Chao Peng 2022-07-20  7266  {
a3b11dafa9058b Chao Peng 2022-07-20  7267  	XA_STATE(xas, &kvm->mem_attr_array, start);
a3b11dafa9058b Chao Peng 2022-07-20  7268  	bool mixed = false;
a3b11dafa9058b Chao Peng 2022-07-20  7269  	gfn_t gfn = start;
a3b11dafa9058b Chao Peng 2022-07-20  7270  	void *s_entry;
a3b11dafa9058b Chao Peng 2022-07-20  7271  	void *entry;
a3b11dafa9058b Chao Peng 2022-07-20  7272  
a3b11dafa9058b Chao Peng 2022-07-20  7273  	rcu_read_lock();
a3b11dafa9058b Chao Peng 2022-07-20  7274  	s_entry = xas_load(&xas);
a3b11dafa9058b Chao Peng 2022-07-20  7275  	while (gfn < end) {
a3b11dafa9058b Chao Peng 2022-07-20 @7276  		if (xas_retry(&xas, entry))
                                                                            ^^^^^
Uninitialized

a3b11dafa9058b Chao Peng 2022-07-20  7277  			continue;
a3b11dafa9058b Chao Peng 2022-07-20  7278  
a3b11dafa9058b Chao Peng 2022-07-20  7279  		KVM_BUG_ON(gfn != xas.xa_index, kvm);
a3b11dafa9058b Chao Peng 2022-07-20  7280  
a3b11dafa9058b Chao Peng 2022-07-20  7281  		entry = xas_next(&xas);
a3b11dafa9058b Chao Peng 2022-07-20  7282  		if (entry != s_entry) {
a3b11dafa9058b Chao Peng 2022-07-20  7283  			mixed = true;
a3b11dafa9058b Chao Peng 2022-07-20  7284  			break;
a3b11dafa9058b Chao Peng 2022-07-20  7285  		}
a3b11dafa9058b Chao Peng 2022-07-20  7286  		gfn++;
a3b11dafa9058b Chao Peng 2022-07-20  7287  	}
a3b11dafa9058b Chao Peng 2022-07-20  7288  	rcu_read_unlock();
a3b11dafa9058b Chao Peng 2022-07-20  7289  	return mixed;
a3b11dafa9058b Chao Peng 2022-07-20  7290  }

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ