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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Nov 2019 19:44:43 -0800
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     linmiaohe <linmiaohe@...wei.com>
Cc:     Haiwei Li <lihaiwei.kernel@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "wanpengli@...cent.com" <wanpengli@...cent.com>,
        "jmattson@...gle.com" <jmattson@...gle.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>
Subject: Re: [PATCH] KVM: SVM: Fix "error" isn't initialized

On Wed, Nov 27, 2019 at 03:30:06AM +0000, linmiaohe wrote:
> 
> > From: Haiwei Li <lihaiwei@...cent.com>
> > Subject: [PATCH] initialize 'error'
> >
> > There are a bunch of error paths were "error" isn't initialized.
> Hi,
> In case error case, sev_guest_df_flush() do not set the error.
> Can you set the value of error to reflect what error happened
> in sev_guest_df_flush()?
> The current fix may looks confused when print "DF_FLUSH failed" with
> error = 0.
> Thanks. 
> 
> PS: This is just my personal point.

Disclaimer: not my world at all...

Based on the prototype for __sev_do_cmd_locked(), @error is intended to be
filled only if there's an actual response from the PSP, which is a 16-bit
value.  So maybe init @psp_ret at the beginning of __sev_do_cmd_locked() to
-1 to indicate the command was never sent to the PSP?  And update the
pr_err() in sev_asid_flush() to explicitly state it's the PSP return?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ