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: <202412132356.dMOiC7ev-lkp@intel.com>
Date: Fri, 13 Dec 2024 23:46:45 +0800
From: kernel test robot <lkp@...el.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Maxim Levitsky <mlevitsk@...hat.com>
Subject: arch/x86/kvm/smm.c:651 emulator_leave_smm() warn: inconsistent
 indenting

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f932fb9b40749d1c9a539d89bb3e288c077aafe5
commit: 3f6821aa147b6e6fe07e8b35999724518b74a632 KVM: x86: Forcibly leave nested if RSM to L2 hits shutdown
date:   3 months ago
config: i386-randconfig-141-20241213 (https://download.01.org/0day-ci/archive/20241213/202412132356.dMOiC7ev-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412132356.dMOiC7ev-lkp@intel.com/

New smatch warnings:
arch/x86/kvm/smm.c:651 emulator_leave_smm() warn: inconsistent indenting

Old smatch warnings:
arch/x86/kvm/smm.c:300 enter_smm() warn: inconsistent indenting

vim +651 arch/x86/kvm/smm.c

   625	
   626		/*
   627		 * FIXME: When resuming L2 (a.k.a. guest mode), the transition to guest
   628		 * mode should happen _after_ loading state from SMRAM.  However, KVM
   629		 * piggybacks the nested VM-Enter flows (which is wrong for many other
   630		 * reasons), and so nSVM/nVMX would clobber state that is loaded from
   631		 * SMRAM and from the VMCS/VMCB.
   632		 */
   633		if (kvm_x86_call(leave_smm)(vcpu, &smram))
   634			return X86EMUL_UNHANDLEABLE;
   635	
   636	#ifdef CONFIG_X86_64
   637		if (guest_cpuid_has(vcpu, X86_FEATURE_LM))
   638			ret = rsm_load_state_64(ctxt, &smram.smram64);
   639		else
   640	#endif
   641			ret = rsm_load_state_32(ctxt, &smram.smram32);
   642	
   643		/*
   644		 * If RSM fails and triggers shutdown, architecturally the shutdown
   645		 * occurs *before* the transition to guest mode.  But due to KVM's
   646		 * flawed handling of RSM to L2 (see above), the vCPU may already be
   647		 * in_guest_mode().  Force the vCPU out of guest mode before delivering
   648		 * the shutdown, so that L1 enters shutdown instead of seeing a VM-Exit
   649		 * that architecturally shouldn't be possible.
   650		 */
 > 651		if (ret != X86EMUL_CONTINUE && is_guest_mode(vcpu))

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ