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: <Zxfg2bTkTgObpexL@google.com>
Date: Tue, 22 Oct 2024 10:28:57 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: oe-kbuild@...ts.linux.dev, Brijesh Singh <brijesh.singh@....com>, lkp@...el.com, 
	oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	Paolo Bonzini <pbonzini@...hat.com>, Alexey Kardashevskiy <aik@....com>, Ashish Kalra <ashish.kalra@....com>, 
	Tom Lendacky <thomas.lendacky@....com>, Liam Merwick <liam.merwick@...cle.com>, 
	Michael Roth <michael.roth@....com>
Subject: Re: arch/x86/kvm/svm/sev.c:454 __sev_guest_init() warn: missing error
 code 'ret'

On Mon, Oct 21, 2024, Dan Carpenter wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3d5ad2d4eca337e80f38df77de89614aa5aaceb9
> commit: 88caf544c9305313e1c48ac1a437faa5df8fff06 KVM: SEV: Provide support for SNP_GUEST_REQUEST NAE event
> config: x86_64-randconfig-161-20241016 (https://download.01.org/0day-ci/archive/20241019/202410192220.MeTyHPxI-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>
> | Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> | Closes: https://lore.kernel.org/r/202410192220.MeTyHPxI-lkp@intel.com/
> 
> New smatch warnings:
> arch/x86/kvm/svm/sev.c:454 __sev_guest_init() warn: missing error code 'ret'
> 
> 88caf544c93053 Brijesh Singh         2024-07-01  452  	/* This needs to happen after SEV/SNP firmware initialization. */
> 88caf544c93053 Brijesh Singh         2024-07-01  453  	if (vm_type == KVM_X86_SNP_VM && snp_guest_req_init(kvm))
> 88caf544c93053 Brijesh Singh         2024-07-01 @454  		goto e_free;
> 
> Hard to tell if this is an error path or not.

It's an error path.  Luckily, the fallout is only that userspace will be confused,
e.g. KVM doesn't continue configuring state thinking that pervious steps succeeded.

I'll send a patch.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ