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: <202110180454.5zjKx82a-lkp@intel.com>
Date:   Mon, 18 Oct 2021 04:25:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [tglx-devel:x86/fpu-kvm 88/88] arch/x86/kernel/fpu/core.c:281:6:
 warning: variable 'ret' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-kvm
head:   dc3cd5721cdb0d3116a2feb84755427d1522477a
commit: dc3cd5721cdb0d3116a2feb84755427d1522477a [88/88] x86/fpu: Add reallocation mechanims for KVM
config: x86_64-randconfig-r031-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git/commit/?id=dc3cd5721cdb0d3116a2feb84755427d1522477a
        git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
        git fetch --no-tags tglx-devel x86/fpu-kvm
        git checkout dc3cd5721cdb0d3116a2feb84755427d1522477a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):

>> arch/x86/kernel/fpu/core.c:281:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
           int ret;
               ^
   1 warning generated.


vim +/ret +281 arch/x86/kernel/fpu/core.c

   275	
   276	int fpu_swap_kvm_fpstate(struct fpu_guest *guest_fpu, bool enter_guest,
   277				 u64 restore_mask)
   278	{
   279		struct fpstate *guest_fps, *cur_fps;
   280		struct fpu *fpu = &current->thread.fpu;
 > 281		int ret;
   282	
   283		if (unlikely(guest_fpu->realloc_request))
   284			ret = fpu_guest_realloc_fpstate(guest_fpu, enter_guest);
   285	
   286		guest_fps = guest_fpu->fpstate;
   287		cur_fps = fpu->fpstate;
   288	
   289		fpregs_lock();
   290		if (!cur_fps->is_confidential && !test_thread_flag(TIF_NEED_FPU_LOAD))
   291			save_fpregs_to_fpstate(fpu);
   292	
   293		/* Swap fpstate */
   294		if (enter_guest) {
   295			fpu->__task_fpstate = cur_fps;
   296			fpu->fpstate = guest_fps;
   297			guest_fps->in_use = true;
   298		} else {
   299			guest_fps->in_use = false;
   300			fpu->fpstate = fpu->__task_fpstate;
   301			fpu->__task_fpstate = NULL;
   302		}
   303	
   304		cur_fps = fpu->fpstate;
   305	
   306		if (!cur_fps->is_confidential) {
   307			restore_mask &= XFEATURE_MASK_FPSTATE;
   308			/* Includes XFD update */
   309			restore_fpregs_from_fpstate(cur_fps, restore_mask);
   310		} else {
   311			/*
   312			 * XSTATE is restored by firmware from encrypted
   313			 * memory. Make sure XFD state is correct while
   314			 * running with guest fpstate
   315			 */
   316			xfd_update_state(cur_fps);
   317		}
   318	
   319		fpregs_mark_activate();
   320		fpregs_unlock();
   321		return 0;
   322	}
   323	EXPORT_SYMBOL_GPL(fpu_swap_kvm_fpstate);
   324	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ