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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <xo6u5domb5y73v3nov5zbhrw26xvotpc64qjn6gv6zfqgew5sk@ado7wo4qo5yl>
Date: Sun, 13 Apr 2025 22:29:57 +0300
From: Fedor Pchelkin <pchelkin@...ras.ru>
To: Mikhail Lobanov <m.lobanov@...a.ru>
Cc: Sean Christopherson <seanjc@...gle.com>, x86@...nel.org, 
	lvc-project@...uxtesting.org, kvm@...r.kernel.org, Dave Hansen <dave.hansen@...ux.intel.com>, 
	linux-kernel@...r.kernel.org, stable@...r.kernel.org, Maxim Levitsky <mlevitsk@...hat.com>, 
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>, 
	Paolo Bonzini <pbonzini@...hat.com>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2] KVM: SVM: forcibly leave SMM mode on vCPU reset

On Sun, 13. Apr 14:57, Mikhail Lobanov wrote:
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index d5d0c5c3300b..34a002a87c28 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -2231,6 +2231,8 @@ static int shutdown_interception(struct kvm_vcpu *vcpu)
>  	 */
>  	if (!sev_es_guest(vcpu->kvm)) {
>  		clear_page(svm->vmcb);
> +		if (is_smm(vcpu))
> +			kvm_smm_changed(vcpu, false);
>  		kvm_vcpu_reset(vcpu, true);
>  	}

This won't compile without CONFIG_KVM_SMM=y being set.

arch/x86/kvm/svm/svm.c: In function ‘shutdown_interception’:
arch/x86/kvm/svm/svm.c:2235:25: error: implicit declaration of function ‘kvm_smm_changed’ [-Wimplicit-function-declaration]
 2235 |                         kvm_smm_changed(vcpu, false);
      |                         ^~~~~~~~~~~~~~~



allmodconfig build which, on the other hand, does have

  CONFIG_KVM_AMD=m
  CONFIG_KVM_SMM=y

also fails with the patch at the current mainline tip.

ERROR: modpost: "kvm_smm_changed" [arch/x86/kvm/kvm-amd.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
make[1]: *** [/home/kc/ISP/Kernel/linux-stable-allmod/Makefile:1959: modpost] Error 2
make: *** [Makefile:248: __sub-make] Error 2


Looks like the fix in its current form requires some ifdef'erry and
EXPORT_SYMBOL***, too?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ