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: <202109010327.6IJbARIR-lkp@intel.com>
Date:   Wed, 1 Sep 2021 03:21:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sean Christopherson <sean.j.christopherson@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Isaku Yamahata <isaku.yamahata@...el.com>,
        Xiaoyao Li <xiaoyao.li@...el.com>,
        Kai Huang <kai.huang@...ux.intel.com>,
        Chao Gao <chao.gao@...el.com>, Yuan Yao <yuan.yao@...el.com>
Subject: [intel-tdx:kvm 106/181] arch/x86/kvm/vmx/tdx.c:263:6: warning:
 variable 'cpu' set but not used

tree:   https://github.com/intel/tdx.git kvm
head:   0c7944582999466d6d979000c4c11a62b78f5472
commit: aca8529f73f7b5fcdb11d4d49e47a8adcd51f2eb [106/181] KVM: TDX: Add "basic" support for building and running Trust Domains
config: x86_64-buildonly-randconfig-r001-20210831 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel/tdx/commit/aca8529f73f7b5fcdb11d4d49e47a8adcd51f2eb
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx kvm
        git checkout aca8529f73f7b5fcdb11d4d49e47a8adcd51f2eb
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kvm/vmx/main.c:16:
   arch/x86/kvm/vmx/tdx.c:27:5: warning: no previous prototype for 'tdx_keyid_alloc' [-Wmissing-prototypes]
      27 | int tdx_keyid_alloc(void)
         |     ^~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/tdx.c:41:6: warning: no previous prototype for 'tdx_keyid_free' [-Wmissing-prototypes]
      41 | void tdx_keyid_free(int keyid)
         |      ^~~~~~~~~~~~~~
   arch/x86/kvm/vmx/tdx.c: In function 'tdx_do_tdh_phymem_cache_wb':
>> arch/x86/kvm/vmx/tdx.c:263:6: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]
     263 |  int cpu, cur_pkg;
         |      ^~~
   arch/x86/kvm/vmx/tdx.c: In function 'tdx_do_tdh_mng_key_config':
   arch/x86/kvm/vmx/tdx.c:343:6: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]
     343 |  int cpu, cur_pkg;
         |      ^~~


vim +/cpu +263 arch/x86/kvm/vmx/tdx.c

   260	
   261	static int tdx_do_tdh_phymem_cache_wb(void *param)
   262	{
 > 263		int cpu, cur_pkg;
   264		u64 err = 0;
   265	
   266		cpu = raw_smp_processor_id();
   267		cur_pkg = topology_physical_package_id(cpu);
   268	
   269		mutex_lock(&tdx_phymem_cache_wb_lock[cur_pkg]);
   270		do {
   271			err = tdh_phymem_cache_wb(!!err);
   272		} while (err == TDX_INTERRUPTED_RESUMABLE);
   273		mutex_unlock(&tdx_phymem_cache_wb_lock[cur_pkg]);
   274	
   275		if (TDX_ERR(err, TDH_PHYMEM_CACHE_WB, NULL))
   276			return -EIO;
   277	
   278		return 0;
   279	}
   280	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ